TinyPortal

Development => Block Codes => Topic started by: Crip on May 08, 2006, 12:22:12 AM

Title: phpMy Quotes
Post by: Crip on May 08, 2006, 12:22:12 AM
This is not the same "Random Quotes" zip I posted a while back,  it's a bit easier to add in a php block..

- zip comes with a .PDF file with simple insructions, with 2 other files you upload in to your Forum root Directory.

- some folks can add it within a phpblock with the <? _ ?> tags and some cannot, I have it working with the included quotes - also works in a php Articel aswell..add as many Quotes as you like..

- be sure to read the PDF file, it explains everything..

Enjoy! ;)

Title: Re: phpMy Quotes
Post by: akulion on May 08, 2006, 12:43:30 AM
thanks :D

Added it the code snippet index under "Q"
Title: Re: phpMy Quotes
Post by: than on June 09, 2006, 01:36:24 PM
Hi, i have problems with this block.

If i go to: http://www.comunidad.than.org.es/Blocks/Registrate/RandomQuote.php

Works good but my block apears empty

code for block: Include â€Ã...“./Blocks/Registrate/RandomQuote.phpâ€Ã,;

Any sugestion?
Title: Re: phpMy Quotes
Post by: G6Cad on June 09, 2006, 01:42:35 PM
try to only have this Include url
Include â€Ã...“RandomQuote.phpâ€Ã,;
Title: Re: phpMy Quotes
Post by: than on June 09, 2006, 01:46:33 PM
Results in empty block

http://www.comunidad.than.org.es/index.php 
2: (null)(): Failed opening 'â€Ã...“RandomQuotephpâ€Ã,' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')
Archivo: /home/thanco/public_html/comunidad/Themes/default/TPortal.template.php (eval?)
LÃÆ'Ã,­nea: 1
Title: Re: phpMy Quotes
Post by: Crip on June 09, 2006, 01:48:01 PM
php/block > Include ("RandomQuote.php"); < add like that <-------

Quote files in the Forum directory, should work..
Title: Re: phpMy Quotes
Post by: G6Cad on June 09, 2006, 01:48:12 PM
When you have the first url posted, (not the one from me) Do you have the right Block for the include?
It should be in a PHP Block
Title: Re: phpMy Quotes
Post by: Crip on June 09, 2006, 01:50:23 PM
 ("RandomQuote.php");

Title: Re: phpMy Quotes
Post by: Crip on June 09, 2006, 01:54:37 PM
This wrong way to add > Include â€Ã...“./Blocks/Registrate/RandomQuote.phpâ€Ã,;

This correct way to add > Include ("RandomQuote.php");
Title: Re: phpMy Quotes
Post by: than on June 09, 2006, 01:56:49 PM
No need to specify the subfolders?
Title: Re: phpMy Quotes
Post by: Crip on June 09, 2006, 02:00:23 PM
add the files in your forum /Smiles/Themes/Sources/Avatars/

in that place the Forum root..
Title: Re: phpMy Quotes
Post by: than on June 09, 2006, 02:05:09 PM
Sorry i donÂÃ,´t understand you.

I donÂÃ,´t have this folders

Title: Re: phpMy Quotes
Post by: Crip on June 09, 2006, 02:09:12 PM
Put files here:
Title: Re: phpMy Quotes
Post by: Crip on June 09, 2006, 02:11:38 PM
Quote from: than on June 09, 2006, 02:05:09 PM
Sorry i donÂÃ,´t understand you.
I donÂÃ,´t have this folders

Yes you do have these folders; or you would not have a Forum/Portal
Title: Re: phpMy Quotes
Post by: Crip on June 09, 2006, 02:15:37 PM
Your files go here:
Quote
/home/thanco/public_html/comunidad/
Title: Re: phpMy Quotes
Post by: than on June 09, 2006, 02:17:39 PM
yes yes i have this folders but not in this structure. ufff sorry my English is  :2funny:

Now woks perfect. Really thanks.  ;D

I use this block to show reasons for registry, only visible for guests.

Thanks thanks, i unknown other thanks expresions jajajaj.   :buck2:
Title: Re: phpMy Quotes
Post by: Crip on June 09, 2006, 02:19:21 PM
Glad I could help. :)
Title: Re: phpMy Quotes
Post by: datu on June 14, 2006, 07:45:42 AM
FYI Guyz,

Crip i tried both your snippets for random quotes using every method that was suggested to no avail.

I then noticed my include looked like this:

Include ("randomquote.php")

The randomquote.php file in my root dir is:

RandomQuote.php

So FYI for those novice PHPers out there, it could be case sensitive.

I changed the case to this:

Include ("RandomQuote.php")

And OMG it worked! Yes!

Yeah i know im a noob, but just wanted to throw that in here in case it would help someone..

Great snippet Crip..

Thnx
Title: Re: phpMy Quotes
Post by: Crip on January 10, 2007, 12:11:54 AM
Zip found and re-attached.