Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
finalheaven
Regular
Regular



Joined: Jul 15, 2006
Posts: 64

PostPosted: Sun Jul 23, 2006 11:32 am Reply with quote

Let me explain what I'm aiming for, and someone can suggest a proper way to do it.

Much like the News stories will list down the center of the page (and leave the margin blocks alone), or as the Forums will take up the center of the page (and also leave blocks alone), I would like to create a center page that loads a list of jpgs I'll be adding to and removing myself.

Would this just be considered new content?

Ultimately, I'd like to create a link in the Modules section (where it says Surveys Member list Forums, etc.), that says, in our case, Downed Bosses, that will link to a center page that shows a list of small jpgs. I also want to be able to update it regularly.

How should I accomplish this? Any suggestions on a Block? or module? Or just plain html/php?

Thanks a bunch.
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun Jul 23, 2006 2:48 pm Reply with quote

To get started, I would suggest that you experiment with blocks administration. News does not have to be the block that's loaded in the center of the home page ... you could have that be content and then create a bunch of content items that each load a jpg. The messages, I believe, will automatically load at the center top of your home page but you can deactivate those. (Worth noting: what loads in home is determined in modules administration so you'd need to adjust that).

If you want something to show up in the modules area on the left side of the page (where traditionally the modules block goes (but again it doesn't have to)) you would need to create a module for it.

I believe that in the blocks administration you can even give a custom name to a block, so if you wanted you could rename content to "downed bosses" and it should work. I haven't tested that though.
 
View user's profile Send private message Visit poster's website
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Sun Jul 23, 2006 3:02 pm Reply with quote

As fkelly mentioned, you could also do it with a message, unless you need php, then you'd need a block.

If you want even more control, take a look at NSN Center Blocks from Nukescripts.net.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
finalheaven







PostPosted: Thu Jul 27, 2006 9:42 am Reply with quote

Let me clarify exactly what I'm trying to do:

For the normal user, the Modules Block with all the standard Module links is on the left side. Amongst those links, I would like to add a link (Downed bosses, Kill Sheet, etc.). When you click on the link, it loads in the center frame content that I would design (basically a list of mug shot pics, whatever, that I'll update frequently).

Much in the same way that if you're on the homepage, and you click Forums, it will load the forums in the center frame.

Yes, I'm dumb. Smile
 
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Thu Jul 27, 2006 11:51 am Reply with quote

Laughing No your not dumb.

This probably confused people when you first posted, almost like you wanted iframes and targets.

Now That you have clarified it, you will need to make a module and then activate it from the admin panel.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
finalheaven







PostPosted: Thu Jul 27, 2006 1:01 pm Reply with quote

darklord wrote:
Laughing No your not dumb.

This probably confused people when you first posted, almost like you wanted iframes and targets.

Now That you have clarified it, you will need to make a module and then activate it from the admin panel.


Ok, that's what I'll do then.

For the moment, I winged by activating the Content Module, and changing the name to Photo Galleries. Then I just created some mock pages. This works for now, but ultimately, by creating my own module, I'll be able to get rid of the extra click, and have two choices in the Module Menu: Downed Bosses, Member's Gallery

You can view it yourself: [ Only registered users can see links on this board! Get registered or login! ]

lol, stumbling along...


Last edited by finalheaven on Thu Jul 27, 2006 2:40 pm; edited 1 time in total 
kguske







PostPosted: Thu Jul 27, 2006 1:07 pm Reply with quote

I think you meant, [ Only registered users can see links on this board! Get registered or login! ]

Sounds like a good plan.
 
finalheaven







PostPosted: Thu Jul 27, 2006 2:42 pm Reply with quote

If I have a javascript that I want to use on a content page, and the javascript requires I load something in the <head> tags first, where would I put that in the content page? I know content pages use html, but would I just use head tags in whatever content page I was creating? Or should I go server side, and actually add it to a particular index page?

The code I need to add is in html btw.
 
kguske







PostPosted: Thu Jul 27, 2006 3:13 pm Reply with quote

You would need to add that to your includes/javascript.php file, but you would probably want to conditionally load that only in the content module.
 
finalheaven







PostPosted: Thu Jul 27, 2006 4:23 pm Reply with quote

kguske wrote:
You would need to add that to your includes/javascript.php file, but you would probably want to conditionally load that only in the content module.


Embarassed

and how would I do that? Very Happy
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Fri Jul 28, 2006 6:54 am Reply with quote

try:


if ($module_name == "Content") {
<<your echo statements for your javascript go here>>
}


NOTE: if that doesn't work (i.e., it doesn't get into your code), you may need the following line above it:

global $module_name;

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
finalheaven







PostPosted: Fri Jul 28, 2006 8:55 am Reply with quote

montego wrote:
try:


if ($module_name == "Content") {
<<your echo statements for your javascript go here>>
}


NOTE: if that doesn't work (i.e., it doesn't get into your code), you may need the following line above it:

global $module_name;


Adding this broke my site (IE loaded blank pages):
Code:


if ($module_name == "Content") {
echo "<SCR IPT LANGUAGE="JavaScript">\n";
echo "<!-- Original:  Ricocheting (ricocheting@hotmail.com) -->\n";
echo "<!-- Web Site:  http://www.ricocheting.com -->\n";
echo "<!-- This script and many more are available free online at -->\n";
echo "<!-- The JavaScript Source!! http://javascript.internet.com -->\n";
echo "<!-- Begin\n";
echo "var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)\n";
echo "current = 0;\n";
echo "function next() {\n";
echo "if (document.slideform.slide[current+1]) {\n";
echo "document.images.show.src = document.slideform.slide[current+1].value;\n";
echo "document.slideform.slide.selectedIndex = ++current;\n";
echo "   }\n";
echo "else first();\n";
echo "}\n";
echo "function previous() {\n";
echo "if (current-1 >= 0) {\n";
echo "document.images.show.src = document.slideform.slide[current-1].value;\n";
echo "document.slideform.slide.selectedIndex = --current;\n";
echo "   }\n";
echo "else last();\n";
echo "}\n";
echo "function first() {\n";
echo "current = 0;\n";
echo "document.images.show.src = document.slideform.slide[0].value;\n";
echo "document.slideform.slide.selectedIndex = 0;\n";
echo "}\n";
echo "function last() {\n";
echo "current = document.slideform.slide.length-1;\n";
echo "document.images.show.src = document.slideform.slide[current].value;\n";
echo "document.slideform.slide.selectedIndex = current;\n";
echo "}\n";
echo "function ap(text) {\n";
echo "document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";\n";
echo "rotate();\n";
echo "}\n";
echo "function change() {\n";
echo "current = document.slideform.slide.selectedIndex;\n";
echo "document.images.show.src = document.slideform.slide[current].value;\n";
echo "}\n";
echo "function rotate() {\n";
echo "if (document.slideform.slidebutton.value == "Stop") {\n";
echo "current = (current == document.slideform.slide.length-1) ? 0 : current+1;\n";
echo "document.images.show.src = document.slideform.slide[current].value;\n";
echo "document.slideform.slide.selectedIndex = current;\n";
echo "window.setTimeout("rotate()", rotate_delay);\n";
echo "   }\n";
echo "}\n";
echo "//  End -->\n";
echo "</scr ipt>\n";
}


EDIT: Nope. Nevermind. The header test section of the Content page doesn't work like the <HE AD> tags in html. Ok, so yeah, I still need help getting that java code to load somewhere. Thanks.
 
montego







PostPosted: Sat Jul 29, 2006 6:52 am Reply with quote

In looking at your code, you are getting parse errors because if you have double quotes inside of a double-quoted string definition, the inner quote need to be escaped. One example of this I see is this line here:

echo "<SCR IPT LANGUAGE="JavaScript">\n";

This should be:

echo "<SCR IPT LANGUAGE=\"JavaScript\">\n";

Blank pages are almost always parse errors.
 
finalheaven







PostPosted: Sat Jul 29, 2006 2:23 pm Reply with quote

Yeah, I ended up getting it working using echo <<<_JS_
the code

And then

_JS_;

or some junk. I say it used somewhere else, so I gave it a try.
 
montego







PostPosted: Sat Jul 29, 2006 2:32 pm Reply with quote

Yes, that method of string assignment is called HEREDOC for future reference or if you want to research it further.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©