Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
how can i add my php file to cnr?

 
Reply to topic    Forum Index » Help View previous topic
View next topic
how can i add my php file to cnr?
Author Message
nolikewise



Joined: 17 Dec 2007
Posts: 64

Post how can i add my php file to cnr? Reply with quote
I have a random_img.php and i want my logo changes evertime hompage is refreshed. But i cannot include it, when i include i gives error. how can i add it to cnr?

Or can you help us to have a random logo on header?

Thank you very much...
Thu Jul 10, 2008 6:56 pm View user's profile Send private message
Guest








Please login to hide the ads.

scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Can you paste your random code? You might have a conflicting variable. I use random image/text/etc on my sites with no trrouble..

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Thu Jul 10, 2008 7:00 pm View user's profile Send private message Visit poster's website AIM Address
Syrion



Joined: 02 Aug 2006
Posts: 172

Post Reply with quote
Ehm... do you include this random logo in CNR or CNR in a page with a random logo?

_________________
Mini-me
Fri Jul 11, 2008 3:08 am View user's profile Send private message
nolikewise



Joined: 17 Dec 2007
Posts: 64

Post Reply with quote
Okay here is the file and needed code to paste to show image...

waiting for your integration

Code:
<img src="<?php echo getRandomImage($path_to_images, $default_img) ?>" alt="">




random_img.rar
 Description:

Download
 Filename:  random_img.rar
 Filesize:  507 Bytes
 Downloaded:  7 Time(s)

Fri Jul 11, 2008 11:30 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Where are you putting that code? I use this random code to randomize logo's or whatever else:

Code:
<?
$random_image = array("<img border=0 src=URL>",
                    "<img border=0 src=URL>",
                    "<img border=0 src=URL>",
                    "<img border=0 src=URL>");
srand(time());
$sizeof = count($random_image);
$randomstuff = (rand()%$sizeof);
print("$random_image[$randomstuff]");
?>


You can put more lines in there and have as many images as you like.. although it might not work the way you want/need it to. I'm having trouble understanding what you want.. I can't really download your files here at work.

Got any idea Syrion?

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Fri Jul 11, 2008 2:24 pm View user's profile Send private message Visit poster's website AIM Address
nolikewise



Joined: 17 Dec 2007
Posts: 64

Post Reply with quote
my aim is to use this file in cnr as a normal php file. And i don't know how to use it as a plug in i mean let's integrate it.
Fri Jul 11, 2008 8:08 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Do you need it in templates? Does it have or need to have anything to do with {avatar}?

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Sat Jul 12, 2008 4:44 am View user's profile Send private message Visit poster's website AIM Address
nolikewise



Joined: 17 Dec 2007
Posts: 64

Post Reply with quote
scottdallas wrote:
Do you need it in templates? Does it have or need to have anything to do with {avatar}?


No no, i just need to show a logo e.g: 150px 75px size on the left or right top of the header and when you walk around news it will change continuously maybe we can adjust it to change in 5 mins. or a pic in a day and another one on the other day.
Sat Jul 12, 2008 8:53 am View user's profile Send private message
Mystic2010



Joined: 10 Jan 2007
Posts: 50

Post Reply with quote
Think he means executing PHP code in news posts.
Sat Jul 12, 2008 8:29 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
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 cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.