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)

DarkReaper 12-29-2001 03:10 AM

It logged me out, and I can't get back in...lol.

Also, its only giving me one result when it should be giving me 4...

Admin 12-29-2001 11:45 AM

Try now. *sigh*
Sorry. :(

floleb7 12-29-2001 12:28 PM

global in root directory or admin ?

cause in root i have only this

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

Admin 12-29-2001 12:39 PM

Quote:

In global.php, find this:
=========================
require('./admin/sessions.php');

DarkReaper 12-29-2001 04:28 PM

Which version are we trying?

floleb7 12-29-2001 06:16 PM

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

Admin 12-30-2001 11:13 AM

[QUOTE]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

Chrysalis 12-31-2001 12:30 AM

installed the initial version and it works great, thanks :)

Dalius 01-02-2002 06:43 PM

Bug:
I have 69 members ( :D ), and one style currently active

But it says only 24 members are using that style

reason for this? :confused:

SirSteve 01-02-2002 06:46 PM

[QUOTE]Originally posted by Dalius
Bug:
I have 69 members ( :D ), and one style currently active

But it says only 24 members are using that style

reason for this? :confused:

pahbi 01-02-2002 07:56 PM

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

Dalius 01-03-2002 03:46 PM

:confused:

Dalius 01-03-2002 11:33 PM

Come on FireFly, help us out here :(

pahbi 01-05-2002 05:07 PM

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

Graphic-Forums 01-05-2002 05:15 PM

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.

Admin 01-05-2002 05:21 PM

E-Mail me with your site info (FTP and admin account for vBulletin).

Graphic-Forums 01-05-2002 06:09 PM

Firefly, I emailed you.

Admin 01-05-2002 06:14 PM

Done.

UtilityGeek 01-10-2002 03:15 AM

Sweet hack. Applied it with no problems. Thanks! :)

patvdv 01-29-2002 12:02 PM

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

[QUOTE]Fatal error: Call to undefined function: getuserinfo() in /opt/apache/htdocs/baan/baanboard/admin/sessions.php on line 323

patvdv 01-29-2002 12:13 PM

never mind the previous post. I solved the problem :)

My second remark still stands. I have 7 styles and can only see 3 of them as only 3 of them are currently in use. At the same time I would still like to see how many users are using which style.

monitox 02-01-2002 04:08 PM

Well.. the hack works ok ONLY on the main page of this forum !?
I tryed and have same problems.. doesn't show OK the number of users wich use a style :(

Anyone can help me with AN WORKING version ? Just like this one from here !? Pls :(

PS: from over 600 members ONLY 32 are using the "default" template and 2 the second one :stoned:
I want to see exactly HOW MANY users are using the templates..:(

Justice 02-05-2002 02:34 AM

is there a way I can add this hack and make it unknown how many people are using the default style? In other words, let's say I don't want my user total to be so obvious, and I have...

default (all others)
style 1 (10 users)
style 2 (15 users)
etc.

I'm guessing this can be done by a simple If statement, but I'm not as proficient as I'd like to be.

TELEK 02-06-2002 02:34 AM

This Hack only shows User-selectable styles right? Because I have a lot of Styles for certain sections of the Board that aren't user selectable anc I don't want those showing up in there.

Admin 02-06-2002 06:37 AM

Yes TELEK.

cihangir 02-09-2002 10:25 PM

[QUOTE]Originally posted by monitox
Well.. the hack works ok ONLY on the main page of this forum !?
I tryed and have same problems.. doesn't show OK the number of users wich use a style :(

Anyone can help me with AN WORKING version ? Just like this one from here !? Pls :(

PS: from over 600 members ONLY 32 are using the "default" template and 2 the second one :stoned:
I want to see exactly HOW MANY users are using the templates..:(


cihangir 02-10-2002 06:35 AM

i ran this query: UPDATE user SET styleid='1'

it works now :)

Birdie501 03-01-2002 06:44 AM

Hi,

could it be that you can only choose a style if at least one member choosed this in his user cp options?

I installed the hack! All the 4 test members just had the default in her options. So in the style drop down there was only the default style shown! Then i changed the style in the options of member A! Then it was also shown in forumhome!???

Is that normal?

+Thanks

Admin 03-01-2002 11:22 AM

Try changing this:
Code:

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

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

Jakeman 03-02-2002 05:36 AM

installed the "user option changing" version that is attached mid-way through this thread. works fine. jake happy.

Admin 03-02-2002 05:45 AM

Do I get good Jake karma?

Jakeman 03-02-2002 06:01 AM

[QUOTE]Originally posted by FireFly
Do I get good Jake karma?

Birdie501 03-04-2002 10:36 PM

[QUOTE]Originally posted by FireFly
Try changing this:
Code:

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

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

Dalius 03-10-2002 01:20 AM

When I have 1 member in one style, and another member in an other, and i swtich to the other, it still says 1-1

Admin 03-10-2002 10:22 AM

Install the version that updates users profile.

Dalius 03-10-2002 01:09 PM

Orkeh Thankees Firecat

hidjra 03-15-2002 10:39 AM

Is it possible to set all my members to use style id 1 in the database

grtzz

Admin 03-15-2002 11:43 AM

Query:
Code:

UPDATE user SET styleid=1;

Birdie501 03-20-2002 10:43 AM

@firefly

its me again! i installed your newer version. i have two styles.
The problem i have is that i can change from 1st to second style , but if i try changing back it doesn't work. It only reloads the page!

Any suggestion?

Thanks

KCardinalart 03-24-2002 04:49 PM

Thank you for another great hack!

I think most all the hacks I'm using on my site are one's you've written.

BTW: The search for custom fields worked perfect to help me set up an address book. :D

I'm sure all the visitors to everyone's sites thanks you also for making their lives easier.

I just wish I knew how to put the drop-down in the header like Jakeman did.
I'm going to have very seperate sections of my site with a log-in on my home page (which won't be the forum index page), so not everyone going to my site will even go to the forum home.

Well... anyway...
Thanks again! I'm looking forward to the next hack. :D


All times are GMT. The time now is 04:17 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.01190 seconds
  • Memory Usage 1,809KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_quote_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