You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 122 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Random quotes [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Antra
Sergeant
Sergeant


Joined: Mar 15, 2003
Posts: 143


PostPosted: Fri Apr 18, 2003 7:12 pm Reply with quoteBack to top

Here's the function I defined in mainfile.php:
Code:
function randomquote() {

$RANDOM_QUOTE_FILE = "quotes.txt";

srand((double)microtime()*1000000);

if (file_exists($RANDOM_QUOTE_FILE)) {
        $array_txt = preg_split("/--NEXT--/", join('',
file($RANDOM_QUOTE_FILE)));
        echo "<center><i>".$array_txt[rand(0, sizeof($array_txt) -1)]."</i></center>;
} else {
        echo "Error: can't open $RANDOM_QUOTE_FILE file";
}
}


I've tried calling it in various places, header.html and theme.php, and if I define a $thing in theme.php and call it in header.html, I think I'm just plain doing it wrong. The output is fine, it's just that instead of the very tippy top of the page, i'd like to put it right below "Welcome username!"/":: Home :: Downloads :: Your Account :: Forums ::"/"April 18, 2003". Tried using the 7px.gif that came with smartDark to insert more space and put in $randomquote (as I'd defined randomquote(); in theme.php) in theme.html, but it didn't do anything for me. Bleh.

Any tips?
Find all posts by AntraView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.359 Seconds - 197 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::