Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 57
5 members and 52 guests
bea9qgchcomberc, deb5tdtconskd9o, peardir46, ral6qkeighqenpa, whyjjinternetvi
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
» .:.

Go Back   Nukemods Forum > NM Staff > Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
random logo
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 18
Join Date: Mar 2003
random logo - 05-30-2003, 11:39 PM

I have several logo's for my site and i wanted to have one picked at random , so they all get used .. Im using the theme smartdark..
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Junior Member
 
Status: Offline
Posts: 17
Join Date: May 2003
05-31-2003, 12:02 AM

just use some java script or phpscript for displaying random images and put it in ur theme in place of ur logo

it should work i guess
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 17
Join Date: May 2003
05-31-2003, 08:43 AM

i was experimentig a lil with this random image logo and i was able to do it

i used this random image generator

Code:
<?php
$dir=opendir("/home/irmin/public_html/baneri/");

$pattern="\.(gif|jpg|jpeg|png|bmp|swf)$";
if(!$dir)
{
die("Failed to read directory");
}
$s=readdir($dir);
$count="0";
$image;
while($s)
{
if(ereg($pattern, $s))
{
$image[$count]=$s;
$count++;
}
$s=readdir($dir);
}
closedir($dir);

//Spit it out
$limit=count($image);
$limit--;
$randNum=rand(0,$limit);

echo "
<img src=\"baneri/$image[$randNum]\">";
?>
i had to modify it to fit my needs and i uploaded that file to my root directory ( image.php )
then in my theme.php

i found these lines of code

Code:
echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" bgcolor=\"#003366\">\n"
	."<tr>\n"
	."<td bgcolor=\"#003366\" align=\"left\" valign=\"top\" width=\"65%\"><a href=\"index.php\"><img src=\"themes/Msn/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a></td>\n"
	."<form action=\"modules.php?name=Search\" method=\"post\">\n"
	."<td align=\"right\" valign=\"top\">\n"
and changed them to this

Code:
echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" bgcolor=\"#003366\">\n"
	."<tr>\n"
	."<td bgcolor=\"#003366\" align=\"left\" valign=\"top\" width=\"65%\"><a href=\"index.php\">\n";
    include("image.php");
	echo "<form action=\"modules.php?name=Search\" method=\"post\">\n"
	."<td align=\"right\" valign=\"top\">\n"
where the "baneri" is the name of the folder with all images
and "irmin" my username or my account name on the server ull have to change those to work for you

im sure there is a better way to do it but this will just give u some ideas how to do it

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Random Quote Block lt_s7orm Nuke 7.x - Blocks 2 03-18-2005 09:10 AM
Help with random member block telli Nuke 6.5 to 6.9 - Blocks 0 06-19-2003 01:43 AM
Random Theme bubbalouey Site design 0 06-07-2003 04:51 AM
need help with a random image in a block smallfry Purged Topics 6 05-30-2003 11:14 PM
random picture block samson Purged Topics 2 12-02-2002 09:38 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31