» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 66
0 members and 66 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Football Betting - best nfl betting promotions at sportsbook.com.
Oral Chelation - initial cleansing of your veins & arteries
Portatiles - Ofertas en Ordenadores y Portatiles. Increibles Ofertas DELL.

Register Now! Contact Us

About this Page
This is a discussion on random logo within the Purged Topics forums, part of the NM Staff category; I have several logo's for my site and i wanted to have one picked at random , so they all ...


Go Back   Nukemods Forum » NM Staff » Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-31-2003, 12:39 AM
Junior Member
 
Join Date: Mar 2003
Posts: 18
random logo
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
  #2 (permalink)  
Old 05-31-2003, 01:02 AM
Junior Member
 
Join Date: May 2003
Posts: 17
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
  #3 (permalink)  
Old 05-31-2003, 09:43 AM
Junior Member
 
Join Date: May 2003
Posts: 17
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 10:10 AM
Help with random member block telli Nuke 6.5 to 6.9 - Blocks 0 06-19-2003 02:43 AM
Random Theme bubbalouey Site design 0 06-07-2003 05:51 AM
need help with a random image in a block smallfry Purged Topics 6 05-31-2003 12:14 AM
random picture block samson Purged Topics 2 12-02-2002 10:38 PM


All times are GMT -5. The time now is 09:37 AM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.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