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)
-   -   Easier Changing of Styles (https://vborg.vbsupport.ru/showthread.php?t=50930)

Dean C 03-29-2003 11:46 AM

[high]* Mist loves the tick ;)[/high]

N9ne 03-29-2003 11:47 AM

Nice hack Steven, we were talking about it on AIM last night, I never got time to check it out here. Looks like it's turned out well. Yet another userCP hack from assassingod ;).

assassingod 03-29-2003 12:09 PM

-Sidekick- ; I knew this would come up. I have not yet found a way round it. And g-force2k2 is absolutly correct. I'll try looking into it more.

N9ne ; Thanks:D And I have plenty more to come;)

-Sidekick- 03-30-2003 01:35 AM

Maybe some vB guy could pop on this one and help us out. Cause I'd love to use this hack along with the style shown with link in the postbit, but I don't want to confuse message board users with their style settings.

filburt1 03-30-2003 01:39 AM

vB by design prefers the styleid cookie over the user cp setting. The only way to fix it is to log out which destroys the cookie. Of course in this hack you can delete the cookie, too, which will do it.

Brian Briscoe 03-30-2003 11:44 AM

AssassinGod,

I tested this on 2.2.9 and it seems to work fine. So you can go ahead and tick off 2.2.9 also :D

assassingod 03-30-2003 03:38 PM

Thanks Phrozen1221:)

Mathiau 04-10-2003 07:31 AM

Curious, how could this be put into the welcome panel (control panel part works

i have it in the welcome panel now - but i have no pull down menu as of yet - i assume that is because i need to put the code i put into usercp.php in another php file?

http://200.12.238.21:6543/welcomepanel.jpg


now, once it is there, any chance that once someone changes the style it will permanently save it like that? i think this was the case with another style selector hack, is it possible with yours?

thnx.

Mathiau 04-10-2003 07:38 AM

okay - i put

Code:

$stylesetlist = "";
  if ($allowchangestyles==1) {
    $stylesets=$DB_site->query("SELECT * FROM style WHERE userselect=1 ORDER BY title");
    if ( !isset($bbuserinfo['realstyleid']) ) {
      $bbuserinfo['realstyleid'] = $bbuserinfo['styleid'];
    }
    while($thisset=$DB_site->fetch_array($stylesets)) {
      if ($bbuserinfo['realstyleid']==$thisset['styleid']) {
        $selected = "selected";
      } else {
        $selected = "";
      }
      $thisid = $thisset['styleid'];
      $thisstylename = $thisset['title'];
      eval ("\$stylesetlist .= \"".gettemplate("usercp_styleset")."\";");
      eval ("\$stylecell = \"".gettemplate("usercp_stylecell")."\";");
    }
  } else {
    $stylecell = "";
  }


into index.php after

Code:

$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=number_format($numbersmembers['users']);

it now shows in welcome panel a pull down with currently "defualt " in it


will this be okay where i posted the code ? or is there a better place i could - also, will this, if someon chooses another style - kep that style permanently, or only as long as that session?

assassingod 04-17-2003 07:05 AM

That should work. If it doesnt, I will have a go:)


All times are GMT. The time now is 06:46 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.02450 seconds
  • Memory Usage 1,732KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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