vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Change Style Drop-Down (https://vborg.vbsupport.ru/showthread.php?t=33418)

yesfans 01-04-2003 11:57 PM

Well I couldnt get it top work, I pulled it off my site. Just a empty box!

Schorsch 01-08-2003 01:24 PM

I installed it, but now I can't change the style on the regular way over the control panel!!

What's wrong ??

Thanks,
Schorsch

incarnus 01-12-2003 09:57 PM

[QUOTE]Originally posted by Schorsch
I installed it, but now I can't change the style on the regular way over the control panel!!

What's wrong ??

Thanks,
Schorsch

leviw 01-18-2003 03:54 PM

Well.. I installed it and it works, but is definatly buggy.

If no one has a particular style selected it disappears from my drop down box. The only way to get it back is to go into the cp, options, reselect the style, submit, go BACK to the home forum and reselect the style.

Aside from this problem its great, I used the most recently posted dl link to get the info, was there a different link to dl the final hack that resolved this problem?

I doubt all you skillfull people put up with this bug, what am I doing wrong?

leviw 01-20-2003 09:38 PM

Okay, I'm pretty new at PHP but I think I see at least where the soloution is.

In the index.php file if I changed this:

$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 this:

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

Would that correct the problem of the list only showing styles that a user is actually on?

ego 01-22-2003 08:46 AM

I want to use the drop down out of the first post.

i have the Problem that the pull down menue only show one style.

What am I to do??

I use the 2.2.9 vb.

Can somebody post the whole scrips?? Thanks

leviw 01-22-2003 09:01 PM

The hack has a bug that allows only styles that have at least 1 user on them to show up under the drop down list.

So far the band-aid fix is to create one dummy user specifically for each style.

I hope someone more knowledgable about php will come along and suggest an actual code fix.

ego 01-23-2003 09:29 PM

I hope this too :smoke:

Destee 01-25-2003 09:44 PM

Thanks again FireFly :)

*clicking installed*

Destee

Destee 01-25-2003 09:48 PM

hmmmm ... i do have one question ...

i want the "Default" choice to say "Destee" instead of "Default"

i can't see where to change this, if someone could direct me please.

i've already renamed the default template set to "Destee" but that made no difference.

Thanks,

Destee

leviw 01-28-2003 12:54 AM

Rename the style not the template. :o

Destee 01-28-2003 03:04 AM

Thank you LeviW ... :)

I'm having one more issue if there is someone who would be so kind as to help me with this.

When choosing a different style from the dropdown, the change is made and reflected in the number of users for that style. My problem is that when a new Member joins the forum, they are not added to either of the total style users.

For example, I now have 1202 Members using one style and 4 using the other (for a total of 1206), but I have 1212 Members. The last 6 joined since installing this hack and they are not being counted in those totals.

During the installation I had the same problem as others, not all the Members being represented. I ran the query: UPDATE user SET styleid='1' and got all the Members showing up ... but the hack doesn't want to count the New Members now.

I know I could have this hack without those numbers, but I like those numbers ... just hoping they can be correct. :)

Any suggestions?

Thanks

Destee

leviw 01-28-2003 04:21 PM

Interesting problem..

I havnt had this situation happen at all, my new users come on and are immediately counted under the default style.

You said you ran a query to update the user set, I'm wondering if that threw off the process somehow. In what context did you run the query?

:pirate: Arrg. Its a pirate! (Its official, I'm bored.)

Destee 01-29-2003 12:40 AM

Hi LeviW ... and thanks again! :)

I ran the query as shown via PhpMyAdmin:

UPDATE user SET styleid=1;

Prior to running it, only a small number of Members were displayed (23 using one style and 2 using the other). The following posts seemed to suggest that running it would get all Members displayed ... and it did.

Post#66 - Post#67 - Post#77 - Post#78

I now have 1219 Members with only 1207 reflected in the styledropdown. New Members are not being counted.

I hope the above is what you meant when asking ... in what context I ran the query. Thanks Again. :)

Destee

leviw 01-29-2003 06:21 PM

That answers my question, but unfortunatly not yours.

Sorry, I dont know why its not showing correctly. :paranoid: Mine's working just fine.

Maybe one of the more profecient hackers can tell ya.

Destee 01-31-2003 08:27 AM

LeviW ... thanks again :)

I'll adjust or remove if I can't get it solved ... it's no real big biggie.

Destee

KuraFire 02-03-2003 08:20 AM

I had this hack for a while but I've removed it -somewhat-. I hardcoded my styles in <option > tags and placed the dropdown box in my Header template, adjusted global.php to make sure to put the right querystring into the <select > form action, and now you can change the style on Any given page on my site (if it's generated through the vB engine anyway). Took one query off of forumhome and the only thing I lost with it is knowing how many users have what style....

Neat eh? :D

leviw 02-03-2003 08:01 PM

Dont spose you feel up for listing your changes as a seperate hack, Kurafire?

I really like your site by the way, especially the different style graphics.

KuraFire 02-04-2003 09:08 PM

I'll see if I can trace back all the changes I've made to make it work, and if I can, I'll release it as a new hack :)

ego 02-04-2003 11:40 PM

thats cool

make it please

SONOFSAM 02-05-2003 01:30 AM

I didnt make it, but i had it on my forums:

add to the end of the phpinclude template:

PHP Code:

if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
    
$result mysql_query("SELECT styleid,title FROM style WHERE userselect=1 ORDER BY title");
    if (!
$result)
    {
        
$styledropdown 'Couldn\'t get a list of styles';
    }
    else
    {
        
$s mysql_fetch_row($result);
        while (
$s != false)
        {
            
$styleid $s[0];
            
$title htmlspecialchars($s[1]);
            
$selected = ($styleid == $bbuserinfo[styleid]) ? " selected" "";

            
$styledropdown .= "<option value=\"$styleid\"$selected>$title</option>";
            
$s mysql_fetch_row($result);
        }
        
$shash $session[sessionhash];
        
$styledropdown "
            <select name=\"newstyleid\" onChange=\"window.location='index.php?s=
$shash&styleid=' + this.value\">
            
$styledropdown
            </select>"
;
    }




Then add to forumhome template where you wish to show:

PHP Code:

<td align="center">
<
smallfont><b>Change Style</b></smallfont><br>$styledropdown<br

or you can put in the header to show on every page generated.

KuraFire 02-06-2003 10:59 AM

SONOFSAM: that will always take them to the forumhome page, not to their current page :p

KuraFire 02-06-2003 12:38 PM

leviw, ego:

https://vborg.vbsupport.ru/showthrea...threadid=48596

and:

https://vborg.vbsupport.ru/showthrea...threadid=48597

Enjoy! :):up:

leviw 02-06-2003 05:18 PM

Thanks Kura! Still checking out all the diferences and deciding which is best for my situation.

The first has an extra query and is simpler, shows # of users on each style?

The second has no query, requires more setup and doesnt show # of users. Loads quicker but extra work.

Just wanted to simplify the differences. =)

KuraFire 02-06-2003 10:17 PM

Yup, those are the differences.

First one requires a query for every page load, second one doesn't, though "more setup" - it's 1 step, in which you upload a file to your admin directory and run it, that's about it for `more setup`.....

If you don't constantly add / remove more Styles to/from your site, or if you don't have much space for the drop down box in your header (me for both) then the hardcoded version is your best choice :)

jancarlo 02-26-2003 02:31 PM

Premetto that is Italian and use a translator in order to write to
you, I hope that you understand to me.

A question: how never I that I have 2500 user it is I have installed 3
stily I see on one style 603 user on one 7 users alone and last the 31
users?

And like never when change quati style I do not see the variation of
they use it in real time?

Practically the contatore not conteggia, that it is for that one?

I know that in all these post could are to us the solution but they
are many and of English I understand some little:)

Thanks and Hello jancarlo

gengar003 04-01-2003 08:51 PM

I installed the style drop-down... but none of my styles showed up... why is that?

InfiniteWebby 04-13-2003 03:10 AM

how do you change it so that on vb 2.3.0 when a user signs up his styleid is not 0 but soemthing different, so Default Vb Style Doesn't show in the drop down?

groovesalad 04-14-2003 07:55 PM

I had this installed on 2.2.8, but when I install it on 2.3.0, it doesn't seem to change the styles...any ideas?

Rapdis 04-17-2003 07:46 PM

oh my god... lol

is there a final version?

Rapdis 04-17-2003 07:47 PM

Everything worked fine, until i uploaded anotha style, its not in the drop down box but is in the user cp... any ideaz?

StealthAnime 04-17-2003 09:11 PM

thanks chen was looking for this :)

Alien 04-19-2003 01:39 AM

Is this confirmed working in a fresh copy of vB 2.3.0? :)

gengar003 04-19-2003 11:07 PM

It works on my vb 2.3.0

Just installed it, it's woderful! THanks!

gengar003 04-19-2003 11:08 PM

Oh, and rapdis, I think i know what the problem is, though I'm relatively inexperienced... does the new style have any users? if not, change your style to it, via CP and it should show up.

Edit: Drat, I double-posted... I thouth VB.org had the stop double post hack, oh well...

Mr. Brian 05-03-2003 04:03 PM

anyone out there have any ideal as why i'm keep getting this error in my showthread after installing this hack

Code:

Warning: Cannot modify header information - headers already sent by (output started at /home/soccerwi/public_html/forum/global.php:379) in /home/soccerwi/public_html/forum/admin/functions.php on line xxxx
thanks

Mr. Brian 05-03-2003 11:30 PM

Anyone can help? :ermm:



[QUOTE]Yesterday at 06:03 PM Matthew Lam said this in Post #196
anyone out there have any ideal as why i'm keep getting this error in my showthread after installing this hack

Code:

Warning: Cannot modify header information - headers already sent by (output started at /home/soccerwi/public_html/forum/global.php:379) in /home/soccerwi/public_html/forum/admin/functions.php on line xxxx
thanks

BustaCap 05-05-2003 04:07 PM

The last part of the instructions says to modify the forumhome template. when I go to edit the forumhome template, it wants to know for which template set to change it. It looks like there is one for every style set I have installed. Do I have to change it for each one?

Also, when I make the new template cal'ed forumhome_dropdownbit, do i put that template in the default template set?

S.Shady 05-16-2003 02:21 PM

Hello. I once had this installed on like 2.2.5 and it worked perfect. After awhile with not making and working on sites i've come back and now use 2.3.0

What i have going on here is. It works but with a few bugs.

1. I have 3 styles 2 will switch and the other the dropdown doesnt have its styleid. (so it will try to load index.php?styleid= )
2. The user count is messed up.

I really like this hack and see it working here perfectly. I would also like to use the perfect one :) any help ?

bluecat 05-28-2003 10:46 PM

I've added a 4th a style template but it won't show up on the home page drop down menu, only in the user's usercp. How can I fix this? Thank you.


All times are GMT. The time now is 08:49 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01498 seconds
  • Memory Usage 1,830KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete