View Full Version : Advanced Gallery
jscheuer1
02-06-2006, 08:45 PM
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.
LeeGoldsmith
02-06-2006, 09:50 PM
Can you tell me how to do that, what the php command is.
Thanks
Lee
ddadmin
02-06-2006, 10:59 PM
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:
<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. :)
LeeGoldsmith
02-07-2006, 02:46 PM
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
<?
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.
ddadmin
02-08-2006, 11:25 AM
I've learned not to argue with Twey on my mistakes. What he said basically. lol
I've learned not to argue with Twey on my mistakes.Only server-side. :)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.