[Help] Random Funct...
 
Notifications
Clear all

[Help] Random Function (Random.php)

6 Posts
4 Users
0 Reactions
3,537 Views
(@bulletwords)
Posts: 5
Active Member
Topic starter
 

For the life of me i can't get this to work with my installation and the most recent instance i've seen of the idea is in eFiction 2.0, can anyone offer me a helping hand? I'm a bit unsure where to even start beyond adding a random.php and putting the suggested code inside.


 
Posted : 28/08/2007 9:33 pm
(@jacynthe)
Posts: 242
Estimable Member
 

You mean as in random quote script or something?

Personally, I decided to use QuoteMe 4.1 (available from http://clarksco.com/index.php?p=26) and call the script inside my index.tpl file. It works great. You can see that in action at http://fanfics.suethomasfbeye.net as the Random TV Quote. The fun thing about that random script is that you can have multiple quote files AND they're easy to manage.


Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 01/09/2007 9:13 pm
(@chris)
Posts: 77
Trusted Member
 

...call the script inside my index.tpl file...

What do mean by calling it and could you explain how?


I charge into the light and need only yours to find my way. Archive of One: Sam Emme Tales

 
Posted : 03/09/2007 11:08 am
(@jacynthe)
Posts: 242
Estimable Member
 

Inside your .tpl (any .tpl file for that mather), you simply have to include the php script - calling it into action. Since a tpl is a template file, you can't use a "normal" php include because it doesn't work. I know cause I tried that before.

So what you need to do is include that code where you want the php script to appear.


<!-- INCLUDESCRIPT BLOCK : ./display.php -->

where display.php is the name of your php script file.


Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 03/09/2007 8:41 pm
(@chris)
Posts: 77
Trusted Member
 

πŸ˜€ Thank you. It's close to what I was thinking about and since right now this is  skin I hope to develop into a archive skin. It is not bad.


I charge into the light and need only yours to find my way. Archive of One: Sam Emme Tales

 
Posted : 03/09/2007 9:08 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
 

Hm, you can run a MIME type for tpl files to pass as PHP. :3


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 04/09/2007 10:37 am
Share: