Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Change Style Drop-Down Details »
Change Style Drop-Down
Mod Version: 1.00, by Chen (Member) Chen is offline
Developer Last Online: Mar 2009 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 2.2.x Rating: (5 votes - 4.20 average) Installs: 206
Released: 22 Dec 2001 Last Update: Never Downloads: 10
Not Supported  

This is exactly what you see here, on this board's main page.
It allows you to easily change the style you are using.
Please note that it does not update your user profile as well, it simply sets a cookie, and until it expires you will see the style you selected.
Anyhow, download the attached .txt file and do what it says.

Scroll down to a post by me if you'd like the hack to update the user setting in the database!
The attached version does NOT do that!

Have fun and happy holidays!

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #46  
Old 29 Dec 2001, 19:16
floleb7's Avatar
floleb7 floleb7 is offline
 
Join Date: Oct 2001
2.2.0


and if the code is in
if (!$servertoobusy) {
require('./admin/sessions.php');
} else {
$session = array();
$bbuserinfo = array();
}

i don't think it will work
Reply With Quote
  #47  
Old 30 Dec 2001, 12:13
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
Originally posted by floleb7
2.2.0


and if the code is in
if (!$servertoobusy) {
require('./admin/sessions.php');
} else {
$session = array();
$bbuserinfo = array();
}

i don't think it will work
If you say so.
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

[email protected]
Reply With Quote
  #48  
Old 31 Dec 2001, 01:30
Chrysalis's Avatar
Chrysalis Chrysalis is offline
 
Join Date: Nov 2001
installed the initial version and it works great, thanks
Reply With Quote
  #49  
Old 02 Jan 2002, 19:43
Dalius Dalius is offline
 
Join Date: Oct 2001
Bug:
I have 69 members ( ), and one style currently active

But it says only 24 members are using that style

reason for this?
Reply With Quote
  #50  
Old 02 Jan 2002, 19:46
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Originally posted by Dalius
Bug:
I have 69 members ( ), and one style currently active

But it says only 24 members are using that style

reason for this?
Was wondering this myself... I have 669 members and 263 using the only style...
Reply With Quote
  #51  
Old 02 Jan 2002, 20:56
pahbi pahbi is offline
 
Join Date: Nov 2001
I keep having trouble to:

When I make more than 2 styles, only the first 2 styles are shown in the drop down box.

When I looked at this bit of the code:

// style drop down box (by FireFly)
$allstyles=$DB_site->query("SELECT style.title, user.styleid, COUNT(*) AS count FROM user LEFT JOIN style USING (styleid) WHERE style.styleid IS NOT NULL AND style.userselect=1 GROUP BY user.styleid");
while ($thisstyle=$DB_site->fetch_array($allstyles)) {
print "test";
if ($styleid==$thisstyle[styleid]) {
$stylesel='selected';
} else {
$stylesel='';
}
eval("\$dropdownbits .= \"".gettemplate('forumhome_dropdownbit')."\";");
}
// style drop down box (by FireFly)

I added the "print 'test';" within the while loop to see how many times it was cycleing, and it seems that the while loop only cycles 2 times, even though I have 3 styles that I've entered.

If I go to my user cp, and choose the last style that I added, and then reload the web page, the while loop then cycles 3 times and shows all available styles.

Is there anyway to configure the mySQL query that is reading the available styles, to print out all the styles that are available?

Thanks,
- Pahbi
Reply With Quote
  #52  
Old 03 Jan 2002, 16:46
Dalius Dalius is offline
 
Join Date: Oct 2001
Reply With Quote
  #53  
Old 04 Jan 2002, 00:33
Dalius Dalius is offline
 
Join Date: Oct 2001
Come on FireFly, help us out here
Reply With Quote
  #54  
Old 05 Jan 2002, 18:07
pahbi pahbi is offline
 
Join Date: Nov 2001
I fixed my problem, and it works fine now.

First I changed in index.php: (its the bit of code for this hack)

$allstyles=$DB_site->query("SELECT style.title, user.styleid, COUNT(*) AS count FROM user LEFT JOIN style USING (styleid) WHERE style.styleid IS NOT NULL AND style.userselect=1 GROUP BY user.styleid");

To:

$allstyles=$DB_site->query("SELECT styleid,title FROM style ORDER BY title");


And then in the forumhome_dropdownbit template I changed the text to read:

<option value="$thisstyle[styleid]" $stylesel>$thisstyle[title]</option>


I don't get a users count anymore, but that really wasn't very important to me anyways. The most important thing is that it lists all of the styles available, and allows the person to choose one, and in that regard, this works perfect for me.

- Pahbi
Reply With Quote
  #55  
Old 05 Jan 2002, 18:15
Graphic-Forums Graphic-Forums is offline
 
Join Date: Nov 2001
Firefly, if you get some time, can you add this to my siote, ive tried. I wouldnt normally ask for help, but I can figure it out.
Reply With Quote
  #56  
Old 05 Jan 2002, 18:21
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
E-Mail me with your site info (FTP and admin account for vBulletin).
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

[email protected]
Reply With Quote
  #57  
Old 05 Jan 2002, 19:09
Graphic-Forums Graphic-Forums is offline
 
Join Date: Nov 2001
Firefly, I emailed you.
Reply With Quote
  #58  
Old 05 Jan 2002, 19:14
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
Done.
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

[email protected]
Reply With Quote
  #59  
Old 10 Jan 2002, 04:15
UtilityGeek UtilityGeek is offline
 
Join Date: Oct 2001
Thumbs up

Sweet hack. Applied it with no problems. Thanks!
Reply With Quote
  #60  
Old 29 Jan 2002, 13:02
patvdv's Avatar
patvdv patvdv is offline
 
Join Date: Nov 2001
Problem

When applying the second version of the hack, I get this error:

Fatal error: Call to undefined function: getuserinfo() in /opt/apache/htdocs/baan/baanboard/admin/sessions.php on line 323
I would also like to see all styles in the listing (possibly with 0 users) so that they are at least selectable.
__________________
Baanboard.com
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 00:50.

Layout Options | Width: Wide Color: