TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,964
  • Latest: stylix
Stats
  • Total Posts: 195,944
  • Total Topics: 21,314
  • Online today: 2,169
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 522
  • Total: 522

Random Quotes

Started by crip, February 06, 2006, 04:35:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

crip

Little php script that show a Random Quote in a phpbox / block.

  • DEMO

    I placed a readme file in the .zip to assit you, but just ask for any help..TIP* the main thing is to have correct paths.

    Add all your own Random Quotes.

    Enjoy, crip! ;D

    Download here.


rapture

Funny stuff.  I might install.  Looks as easy as uploading 3 files and calling some PHP in a side block.

Thanks for sharing.

Ray

I can never get that command to work  include "./quote/randomquote.php";

ok my quote folder is rranderson\arcade\quote or http://www.rranderson.com/arcade/quote

would that path work because I keep getting a
$number-1){ // If ran out of quotes, start again! $num=0; } if (file_exists($directory.$quotecountfile)) { $nu = fopen ($directory.$quotecountfile, "w"); fputs($nu,$num); } else { die("Cant Find $quotecountfile"); } } // display the quote on the page echo "$quotes[$num]"; ?>error

in randomquote.pnp i have $directory = "./quote/";
in the PHP block I have  include "./quote/randomquote.php";
What am I doing wrong - time for me to learn this

Thanks

IchBin

try the path without the "."

include "/quote/randomquote.php";

crip

After you upload your "quote" folder in your forum root, just go to a phpbox and add what Incbin put..

this:
****************************
include "/quote/randomquote.php";
****************************
nothing more, nothing less.

It's EZ now guys, once Bloc and crew told me how to add it..Lol..

Later, crip~ ;D

Ray

Quote from: IchBinâââ,¬Å¾Ã,¢ on February 08, 2006, 07:40:17 PM
try the path without the "."

include "/quote/randomquote.php";
Get the same error errr I know it can not be this hard

IchBin

Did you try this?


include "/rranderson/arcade/quote/randomquote.php";

crip

I just checked my phpbox .. this is all thats in it.
include "./quote/randomquote.php";

Ray, be sure you have the path from your randomquote.php correct .. the "quotes" folder Must be in the root of your Forum / Arcade / Where ever, Or the call for Randomquote.php will send errors until your get the path right.. 

I have my "quote" Folder inside of my "Forum" Folder where / Smileys / Themes / Packages / Sources / et-ceteras..are.

Later, Crip~ ;D

Rasyr

Try using:

include "quote/randomquote.php";

see if that works.

or perhaps try

require("quote/randomquote.php");

with and without the leading slash before the word "quote".

Ray


This website is proudly hosted on Crocweb Cloud Website Hosting.