Results 1 to 7 of 7

Thread: Advanced Gallery

  1. #1
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default Advanced Gallery

    Quote Originally Posted by LeeGoldsmith in Bug Reports
    John

    Thanks very much for the help. I got the script to work correctly. It was because I was using CuteSiteBuilder and frames that I was having trouble. I placed the code for the HEAD in with the other code and now it works fine.

    One more question, is there a way to get the content of the messages to be in a file so I can make changes to that file and not re-publish each time I want to make a change.

    Thanks

    Lee
    No real easy way except that, since it looks like you are already using PHP, you could have them be in a server side include.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  2. #2
    Join Date
    Feb 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Can you tell me how to do that, what the php command is.

    Thanks

    Lee

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Script in question: http://www.dynamicdrive.com/dynamicindex17/agallery.htm

    Use PHP include() command on your page, for example:

    <?
    include "/gallerycontents.txt";
    ?>

    gallerycontents.txt would then contain the HTML (code of Step 2) of the gallery:

    Code:
    <div class="gallerycontent" subject="What is JavaScript?">
    JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
    </div>
    
    <div class="gallerycontent" subject="Java & JavaScript Differences">
    Java is completely different from JavaScript- it's more powerful, more complex, and unfortunately, a lot harder to master. It belongs in the same league as C, C++, and other more complex languages.
    </div>
    
    <div class="gallerycontent" subject="What is DHTML?">
    DHTML is the embodiment of a combination of technologies- JavaScript, CSS, and HTML. Through them a new level of interactivity is possible for the end user experience.
    </div>
    
    <!--HTML for gallery control options below. Remove checkboxes or entire outer DIV if desired -->
    
    <div id="controldiv" style="display:none" class="gallerycontroller">
    <form name="gallerycontrol">
    
    <select class="gallerycontroller" size="3" name="menu" onChange="manualcontrol(this.options.selectedIndex)">
    <option>Blank form</option>
    </select><br>
    
    Auto: <input type="radio" checked name="mode" value="auto" onClick="preparemode('auto')"> Manual: <input type="radio" name="mode" value="manual" onClick="preparemode('manual')">
    
    </form>
    </div>
    Untested yet, but should work.

  4. #4
    Join Date
    Feb 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks will give it a try soon and let you know if it worked. This will make changes to the AGallery much easier for me.

    Lee

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by ddadmin
    <?
    include "/gallerycontents.txt";
    ?>
    It's pretty unlikely that "gallerycontents.txt" is going to be in the root directory of the server.
    Lee: this is from the server's point of view, not the browser's. So, if the browser goes to http://www.mysite.com/gallerycontents.txt and gets served /var/www/html/gallerycontents.txt (or C:\webroot\gallerycontents.txt, or whatever your OS may use), to access that file in PHP (with an absolute path) you need to do it from the server's point of view: in our example, that's /var/www/html/gallerycontents.txt, not /gallerycontents.txt. Of course, you can always just use a relative path.

    ddadmin: avoid using short tags for code that may run on a server that doesn't have them enabled.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I've learned not to argue with Twey on my mistakes. What he said basically. lol

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I've learned not to argue with Twey on my mistakes.
    Only server-side.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •