The Five-Minute Forums  

Go Back   The Five-Minute Forums > FiveMinute.net > 5MV Talk
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2006, 01:02 AM
PointyHairedJedi's Avatar
PointyHairedJedi PointyHairedJedi is offline
He'd enjoy a third pie
Member
 
Join Date: Mar 2003
Location: The Scotlands
Posts: 4,354
Send a message via ICQ to PointyHairedJedi Send a message via AIM to PointyHairedJedi Send a message via Yahoo to PointyHairedJedi
Default About the (eventual) skin

I was just thinking, it would be really cool Zeke if you created five different skins for the board that are all the same bar the ship that appears in the top left hand logo deely. Being able to pick which series you want displayed would be very very nice indeed, and not all that much work, surely?
__________________
Mason: Luckily we at the Agency use use a high-tech piece of software that will let us spot him instantly via high-res satellite images.
Sergeant: You can? That's amazing!
Mason: Yes. We call it 'Google Earth'.
- Five Minute 24 S1 (it lives, honest!)

"Everybody loves pie!"
- Spongebob Squarepants
Reply With Quote
  #2  
Old 01-20-2006, 03:23 AM
KillerGodMan's Avatar
KillerGodMan KillerGodMan is offline
More something than this cat
Member
 
Join Date: Sep 2004
Location: Ontario
Posts: 1,689
Send a message via MSN to KillerGodMan Send a message via Skype™ to KillerGodMan
Default

There's an idea, because let me tell you, I'd much rather have the Enterprise D or E than the NX-01
__________________
-KillerGM

Well I guess I'll just live WITHOUT an avatar then!
Reply With Quote
  #3  
Old 01-20-2006, 04:39 AM
Zeke's Avatar
Zeke Zeke is offline
The lens that flares in the night
Administrator
 
Join Date: Apr 2004
Location: Ottawa, ON
Posts: 3,405
Send a message via ICQ to Zeke Send a message via AIM to Zeke Send a message via Yahoo to Zeke
Default

I've had this idea before. The bad news is, it won't work. The good news is, I have another idea which might.

The thing about skins is that each one has its own folder of .tpl files which are templates for the various pages. That means that every time I make a modification to the forums -- the suggested gender mod, for example -- I have to edit the relevant .tpl files in both of our current skins. Those files aren't quite identical, so I have to edit and upload them separately just to be safe. You see the problem: if we had a skin for every ship you guys might want in the forum logo, maintenance would become a nightmare.

However, I think there's another way to do it. What I can do is add another field to the user profile allowing you guys to choose from various logos. Based on your choice, the forum header template could then load the appropriate logo (as long as you were logged in). That would be more work than the gender mod, but I think I could do it.

A simpler alternative would just be to make a bunch of logos and make the selection random. I might try that first.
__________________
FiveMinute.net: because stuff is long and life is short

[03:17] FiveMinZeke: Galactica clearly needs the advanced technology of scissors, which get around the whole "yanking on your follicles" problem.
[03:17] IJD: cylons can hack any blades working in conjunction
Reply With Quote
  #4  
Old 01-20-2006, 08:52 AM
Chancellor Valium's Avatar
Chancellor Valium Chancellor Valium is offline
Reasonably priced male pills
Member
 
Join Date: Sep 2004
Location: Rhen Var, sitting on a radiator...
Posts: 4,595
Send a message via MSN to Chancellor Valium
Default

Ooh! I like the second one! Can one of them be a salmon?
__________________
O to be wafted away
From this black aceldama of sorrow;
Where the dust of an earthy today
Is the earth of a dusty tomorrow!
Reply With Quote
  #5  
Old 01-20-2006, 02:07 PM
mudshark's Avatar
mudshark mudshark is offline
Is he ever gonna hit Krazy Kat, or what?
Member
 
Join Date: Mar 2003
Location: UMRK
Posts: 1,738
Default

^ The Salmon of Doubt?
__________________
Methinks Ted Sturgeon was too kind.

'Yes, but I think some people should be offended.'
-- John Cleese (on whether he thought some might be offended by Monty Python)
Reply With Quote
  #6  
Old 01-20-2006, 03:49 PM
Sa'ar Chasm's Avatar
Sa'ar Chasm Sa'ar Chasm is offline
Our last, best hope for peace
Staff
 
Join Date: Mar 2003
Location: Sitting (in Ottawa)
Posts: 3,425
Default

^ I wouldn't think so. Seems kinds fishy.
__________________
The first run through of any experimental procedure is to identify any potential errors by making them.
Reply With Quote
  #7  
Old 01-20-2006, 03:52 PM
Zeke's Avatar
Zeke Zeke is offline
The lens that flares in the night
Administrator
 
Join Date: Apr 2004
Location: Ottawa, ON
Posts: 3,405
Send a message via ICQ to Zeke Send a message via AIM to Zeke Send a message via Yahoo to Zeke
Default

Quote:
Originally Posted by mudshark
^ The Salmon of Doubt?
Attaboy. If you're gonna pun, do it Gently.
__________________
FiveMinute.net: because stuff is long and life is short

[03:17] FiveMinZeke: Galactica clearly needs the advanced technology of scissors, which get around the whole "yanking on your follicles" problem.
[03:17] IJD: cylons can hack any blades working in conjunction
Reply With Quote
  #8  
Old 01-20-2006, 04:40 PM
Sa'ar Chasm's Avatar
Sa'ar Chasm Sa'ar Chasm is offline
Our last, best hope for peace
Staff
 
Join Date: Mar 2003
Location: Sitting (in Ottawa)
Posts: 3,425
Default

ARRRRGH!

Stealth puns. You never see them coming.
__________________
The first run through of any experimental procedure is to identify any potential errors by making them.
Reply With Quote
  #9  
Old 01-20-2006, 05:07 PM
Chancellor Valium's Avatar
Chancellor Valium Chancellor Valium is offline
Reasonably priced male pills
Member
 
Join Date: Sep 2004
Location: Rhen Var, sitting on a radiator...
Posts: 4,595
Send a message via MSN to Chancellor Valium
Default

Quote:
Originally Posted by Zeke
Quote:
Originally Posted by mudshark
^ The Salmon of Doubt?
Attaboy. If you're gonna pun, do it Gently.
You never do detect these things until it's too late.

It's holly iritating.
__________________
O to be wafted away
From this black aceldama of sorrow;
Where the dust of an earthy today
Is the earth of a dusty tomorrow!
Reply With Quote
  #10  
Old 01-20-2006, 05:23 PM
Sa'ar Chasm's Avatar
Sa'ar Chasm Sa'ar Chasm is offline
Our last, best hope for peace
Staff
 
Join Date: Mar 2003
Location: Sitting (in Ottawa)
Posts: 3,425
Default

Zeke's the master of the stealth pun. He's a bit of a dirk that way.
__________________
The first run through of any experimental procedure is to identify any potential errors by making them.
Reply With Quote
  #11  
Old 01-20-2006, 08:47 PM
Chancellor Valium's Avatar
Chancellor Valium Chancellor Valium is offline
Reasonably priced male pills
Member
 
Join Date: Sep 2004
Location: Rhen Var, sitting on a radiator...
Posts: 4,595
Send a message via MSN to Chancellor Valium
Default

Quote:
Originally Posted by Sa'ar Chasm
Zeke's the master of the stealth pun. He's a bit of a dirk that way.
Gently does it! You don't want to offend him...
__________________
O to be wafted away
From this black aceldama of sorrow;
Where the dust of an earthy today
Is the earth of a dusty tomorrow!
Reply With Quote
  #12  
Old 01-20-2006, 09:40 PM
Sa'ar Chasm's Avatar
Sa'ar Chasm Sa'ar Chasm is offline
Our last, best hope for peace
Staff
 
Join Date: Mar 2003
Location: Sitting (in Ottawa)
Posts: 3,425
Default

We've done that one already.

If he does get offended, he can go drown his sorrows in a gin sea.
__________________
The first run through of any experimental procedure is to identify any potential errors by making them.
Reply With Quote
  #13  
Old 01-20-2006, 10:03 PM
e of pi's Avatar
e of pi e of pi is offline
Outnumbered
Member
 
Join Date: Sep 2005
Location: Indianapolis, Indiana
Posts: 2,642
Send a message via MSN to e of pi
Default

The puns! They burn! But in a good way!
__________________
e of pi, fastest keyboard in the fora.

e of pi: I know you have too much free time.
Ddoof: HEY!
e of pi: Well, so does anyone who posts on 5M.net. It comes from the extra 55 minutes.

We are the BSG. Your resources and injokes wil be added to our own, depleting your fanbase. Resistance is futile. So say we all.
Member of the Persons Who Believe that Ryan Connors Leslie Should Have Lines in Other Series Since He's Hardly In TOS Fivers
Reply With Quote
  #14  
Old 01-20-2006, 11:52 PM
whoiam whoiam is offline
whathistitleis
Member
 
Join Date: Jun 2005
Location: Birmingham Uni
Posts: 832
Send a message via MSN to whoiam
Default

Quote:
Originally Posted by Zeke
I've had this idea before. The bad news is, it won't work. The good news is, I have another idea which might.

The thing about skins is that each one has its own folder of .tpl files which are templates for the various pages. That means that every time I make a modification to the forums -- the suggested gender mod, for example -- I have to edit the relevant .tpl files in both of our current skins. Those files aren't quite identical, so I have to edit and upload them separately just to be safe. You see the problem: if we had a skin for every ship you guys might want in the forum logo, maintenance would become a nightmare.

However, I think there's another way to do it. What I can do is add another field to the user profile allowing you guys to choose from various logos. Based on your choice, the forum header template could then load the appropriate logo (as long as you were logged in). That would be more work than the gender mod, but I think I could do it.

A simpler alternative would just be to make a bunch of logos and make the selection random. I might try that first.
Sorry I didn't butt in sooner, but wouldn't it be possible to create the extra folders for the alternate layouts, and just redirect the requests for .tpl files through the strategic use of mod_rewrite and a .htaccess file?

Or, better yet, I know there are ways to use a php file to dynamically select the image that gets displayed... say that you add one field to each user's profile where they select which ship they'd like to see, and then point the layout at a php script for displaying the pic they'd chosen?

*is gonna try making that one himself*
__________________
Me, singing: Krieg, huh... wozu ist der gut?
Um Europa zu übernehmen!

Vote Morphine - the party for Not Crushing Opium!

Yoda, to his ice-cream: The sauce is upon you, and soon, sprinkles must fall!
Reply With Quote
  #15  
Old 01-21-2006, 05:40 AM
KillerGodMan's Avatar
KillerGodMan KillerGodMan is offline
More something than this cat
Member
 
Join Date: Sep 2004
Location: Ontario
Posts: 1,689
Send a message via MSN to KillerGodMan Send a message via Skype™ to KillerGodMan
Default

^You do that, I'll be in that corner moping because I had NO idea what you just said
__________________
-KillerGM

Well I guess I'll just live WITHOUT an avatar then!
Reply With Quote
  #16  
Old 01-21-2006, 05:53 AM
whoiam whoiam is offline
whathistitleis
Member
 
Join Date: Jun 2005
Location: Birmingham Uni
Posts: 832
Send a message via MSN to whoiam
Default

okay, I'll try again..

php - the scripting language that this forum is written in - typically has the ability to manipulate images built into it. It is possible to create a php script which you can call as an image file, and which will just return an image when called.

I use one such script to make thumbnails for my photo gallery.

The point is, that you could set the image to link to one of these scripts instead of to an actual file, and you could have the script look up with ship the person in question prefers, and send out the correct image file for that person. Only one style, a slight modification to the database, a slight modification to the signup and profiles pages, and 1 fairly straightforward php script and you're laughing.
__________________
Me, singing: Krieg, huh... wozu ist der gut?
Um Europa zu übernehmen!

Vote Morphine - the party for Not Crushing Opium!

Yoda, to his ice-cream: The sauce is upon you, and soon, sprinkles must fall!
Reply With Quote
  #17  
Old 01-21-2006, 08:50 AM
Chancellor Valium's Avatar
Chancellor Valium Chancellor Valium is offline
Reasonably priced male pills
Member
 
Join Date: Sep 2004
Location: Rhen Var, sitting on a radiator...
Posts: 4,595
Send a message via MSN to Chancellor Valium
Default

Quote:
Originally Posted by Sa'ar Chasm
We've done that one already.
I know, but I couldn't think of another

Besides, Zeke is hoarding all the puns in caverns measureless to man...
__________________
O to be wafted away
From this black aceldama of sorrow;
Where the dust of an earthy today
Is the earth of a dusty tomorrow!
Reply With Quote
  #18  
Old 01-21-2006, 10:11 AM
Zeke's Avatar
Zeke Zeke is offline
The lens that flares in the night
Administrator
 
Join Date: Apr 2004
Location: Ottawa, ON
Posts: 3,405
Send a message via ICQ to Zeke Send a message via AIM to Zeke Send a message via Yahoo to Zeke
Default

Quote:
Originally Posted by whoiam
Sorry I didn't butt in sooner, but wouldn't it be possible to create the extra folders for the alternate layouts, and just redirect the requests for .tpl files through the strategic use of mod_rewrite and a .htaccess file?
I've never heard of mod_rewrite, and I've heard of .htaccess but I have no idea what it is. I would need to do research before I'd even understand this idea.

Quote:
Or, better yet, I know there are ways to use a php file to dynamically select the image that gets displayed... say that you add one field to each user's profile where they select which ship they'd like to see, and then point the layout at a php script for displaying the pic they'd chosen?
That sounds exactly the same difficulty as the idea I posted, so I'll try mine first. Thanks for the advice, though.
__________________
FiveMinute.net: because stuff is long and life is short

[03:17] FiveMinZeke: Galactica clearly needs the advanced technology of scissors, which get around the whole "yanking on your follicles" problem.
[03:17] IJD: cylons can hack any blades working in conjunction
Reply With Quote
  #19  
Old 01-21-2006, 03:04 PM
whoiam whoiam is offline
whathistitleis
Member
 
Join Date: Jun 2005
Location: Birmingham Uni
Posts: 832
Send a message via MSN to whoiam
Default

mod_rewrite's an apache module for doing slightly more complicated redirects - for instance, redirecting every url containing '.tpl' to a different folder.

.htaccess is a 'supplementary' configuration file for apache that sits in the directory it's meant to affect.

I'm going to modify one of the test forums I keep to try and get the dynamic image generator working, if you want to give that mod a try, let me know.
__________________
Me, singing: Krieg, huh... wozu ist der gut?
Um Europa zu übernehmen!

Vote Morphine - the party for Not Crushing Opium!

Yoda, to his ice-cream: The sauce is upon you, and soon, sprinkles must fall!
Reply With Quote
  #20  
Old 01-21-2006, 04:58 PM
whoiam whoiam is offline
whathistitleis
Member
 
Join Date: Jun 2005
Location: Birmingham Uni
Posts: 832
Send a message via MSN to whoiam
Default

Okay, I just spent awhile sketching out the first half of an idea...
(this needs mod_rewrite - ask your host if that's available)

First up, the two example files I made you can find at http://thirdcursus.com/partial-mod.zip

Now, the way I made this section of the mod work is to move all the contents of the /templates//images/ folder to a new folder (I used /templates//target/ when I was writing it). Then edit the .htaccess file so that it contains the proper URL for the folder you moved the images to. (There's only one URL in the file, so just change that to the URL you've used), and place it in the now-empty images folder.

Next, you need to edit the spic.php file. The 6 variables at the top will need to be replaced with ones that will allow read access to the phpbb_users table (or whatever you named your equivalent).

The first variable ($field) needs to be set to the field in the users table that will be used to store the person's choice of picture. the second, $default, is the picture you want someone to see if they haven't made a selection yet.

The spic.exe file then goes into the 'target' folder along with the images.

This system also needs you to add one field to the user table (remember to allow this to be null, or you'll have to modify the signup process as well), and to modify the profile page to allow people to chose options from a drop-down box to go into that field.

*grins* That was an hour well-wasted, I think.

Anyway, this is the code from the two files, feel free to play around with it.

Quote:
Originally Posted by .htaccess
Options All
RewriteEngine on
RewriteRule ^(.*)/?$ http://www.thirdcursus.com/forum/templates/subsilver/target/spic.php?file=$1 [R=301,L]
Quote:
Originally Posted by spic.php
$field = "replace_me";
$default = "defaultpic.gif";
$hostname_con1 = "localhost";
$database_con1 = "forum";
$table_con1 = "phpbb_users";
$username_con1 = "root";
$password_con1 = "xxx";

// File
$filename = $_GET['file'];


if (eregi ("logo_phpbb.gif", $filename)) {

define('IN_PHPBB', true);
$phpbb_root_path = '../../../';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);

$user = $userdata['user_id'];

$con1 = mysql_connect($hostname_con1, $username_con1, $password_con1) or trigger_error(mysql_error(),E_USER_ERROR);

$query_Recordset1 = "SELECT `$field` FROM `$table_con1` where `user_id` = '$user'";
$Recordset1 = mysql_query($query_Recordset1, $con1) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

$filename = $row_Recordset1[$field];
if($filename=='') { $filename = $default; }
// Content type
header('Content-type: image/gif');

// Load
$source = imagecreatefromgif($filename);

// Output
imagegif($source);

}elseif (eregi ("\.jpg", $filename)) {

header('Content-type: image/jpg');

// Load
$source = imagecreatefromjpeg($filename);

// Output
imagejpeg($source);

}elseif(eregi ("\.gif", $filename))
{
// Content type
header('Content-type: image/gif');

// Load
$source = imagecreatefromgif($filename);

// Output
imagegif($source);
}elseif(eregi ("\.htm", $filename)) {
include('index.htm');
}
?>
__________________
Me, singing: Krieg, huh... wozu ist der gut?
Um Europa zu übernehmen!

Vote Morphine - the party for Not Crushing Opium!

Yoda, to his ice-cream: The sauce is upon you, and soon, sprinkles must fall!
Reply With Quote
Reply


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 On

Forum Jump


All times are GMT. The time now is 04:47 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.