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)
-   -   Admin can change default style from admin cp (https://vborg.vbsupport.ru/showthread.php?t=50491)

Brad 04-25-2003 05:14 PM

Quote:

Today at 10:17 AM FFArmageddon said this in Post #19
uhm hey I am having a problem with this :\

It changed tbe default style fine for members who are logged in. But if you are a guest or logged out, only the forum main page style changes.

Could it have something to do with the issues I mentioned on vbt?

Im not sure what could be doing that.

You might want to think about opening a support ticket.

FFArmageddon 04-25-2003 08:16 PM

Ok I think I will do just that :)

thanks

Jujimufu 04-27-2003 12:46 AM

This isn't working for me. I installed it and no errors, but it doesn't do anything. I have 2 styles. One called default and one called Empire I created. So that's 2 including the one that came with the forum. I tried setting style ID to 1-2-3-4-5-6.dsfpiaq3poias-e0fm alot of them lol! And nothing ever happens as should. I expected for when a new visitor who visits the board will have the style set as Empire not default. And... it doesn't I don't understand lol! Sorry, maybe it's obvious but it's definately not harming me, or working at that either.

mx3 04-27-2003 02:19 AM

w00t!!! i've needed this for sooo long! *installs!*

works fine!

TheEnd 04-27-2003 06:42 AM

How do I tell what the style ID is? I got like 3 styles, wheres it say which is which?

Brad 04-27-2003 03:19 PM

How to find styleid's.


This adds the current style id of a style to the modifiy styles page of the admin cp, makes it easyer on newbies who dont know how to find style id's ;)

To upgrade:

In /admin/style.php find:

PHP Code:

// ###################### Start Modify #######################
if ($action=="modify") {

  
doformheader("","");
  
maketableheader("Style Sets");
  
$styles=$DB_site->query("SELECT styleid,title FROM style ORDER BY title");
  while (
$style=$DB_site->fetch_array($styles)) {

    echo 
"<tr class='".getrowbg()."'>\n<td><p>$style[title]</p></td><td><p>".
            
makelinkcode("fonts/colors/etc","style.php?s=$session[sessionhash]&action=styles&dostyleid=$style[styleid]").
            
makelinkcode("properties","style.php?s=$session[sessionhash]&action=edit&editstyleid=$style[styleid]",0,"edit style properties").
            
makelinkcode("download","style.php?s=$session[sessionhash]&action=dodownload&styleid=$style[styleid]").
            
iif($style[styleid]!=1,makelinkcode("remove","style.php?s=$session[sessionhash]&action=remove&styleid=$style[styleid]"),"").
            
"</p></td></tr>\n";

  }

  echo 
"</table></td></tr></table>";



Replace by:

PHP Code:

// ###################### Start Modify #######################
if ($action=="modify") {

  
doformheader("","");
  
maketableheader("Style Sets");
  
$styles=$DB_site->query("SELECT styleid,title FROM style ORDER BY title");
  while (
$style=$DB_site->fetch_array($styles)) {

    echo 
"<tr class='".getrowbg()."'>\n<td><p>$style[title] (style id $style[styleid])</p></td><td><p>".
            
makelinkcode("fonts/colors/etc","style.php?s=$session[sessionhash]&action=styles&dostyleid=$style[styleid]").
            
makelinkcode("properties","style.php?s=$session[sessionhash]&action=edit&editstyleid=$style[styleid]",0,"edit style properties").
            
makelinkcode("download","style.php?s=$session[sessionhash]&action=dodownload&styleid=$style[styleid]").
            
iif($style[styleid]!=1,makelinkcode("remove","style.php?s=$session[sessionhash]&action=remove&styleid=$style[styleid]"),"").
            
"</p></td></tr>\n";

  }

  echo 
"</table></td></tr></table>";



Thats it!

BoardTyrant 05-01-2003 01:24 PM

How do you run an SQL Query or rather where do I run the needed SQL query :

INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorde r) VALUES (NULL,2,'Default style set.','loo_default_style','1','Set this number to the style id you wish to be displayed by deault (note: This will not overwrite style settings in user profiles!)','','7');

Also, how do I view the global.php file and edit it?

Brad 05-01-2003 04:03 PM

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=39142" target="_blank">https://vborg.vbsupport.ru/showt...threadid=39142</a>

BoardTyrant 05-01-2003 04:58 PM

Thanks I hope I can figure it out

gwhooooey 05-03-2003 10:18 PM

Quote:

04-25-03 at 03:17 PM FFArmageddon said this in Post #19
uhm hey I am having a problem with this :\

It changed tbe default style fine for members who are logged in. But if you are a guest or logged out, only the forum main page style changes.

Could it have something to do with the issues I mentioned on vbt?

Same problem here


All times are GMT. The time now is 05:24 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.01068 seconds
  • Memory Usage 1,766KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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