vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

Digital Jedi 02-28-2013 04:27 AM

If you're customizing your own CSS, you can do whatever you want. There's no limitations there. But if you mean using the different styles in your Style Manager, then that's a little trickier. You can just put the style ID in the link to those pages, but that would set each user's options to that style each time they visited. I know forums can be set to force use a style without doing that, but I'm unfamiliar with how to do that for a custom page.

fxdigi-cash 02-28-2013 05:10 AM

Thanks @Digital for the information.

I guess I will have to find a way to force the general style to forum pages while the custom style is used for custom pages.

now I believe I need to look around the net to digg more for this issue.

Thanks again. That was very helpful

cellarius 02-28-2013 06:59 AM

You should be able to do something like that at in a plugin on hook style_fetch
PHP Code:

if (THIS_SCRIPT == "test")
{
    
$styleid 4398;


Where 4398 of course needs to be replaced by the id of the style to be used, and THIS_SCRIPT needs to equal the constant you are setting on your custom page.

fxdigi-cash 02-28-2013 01:42 PM

Quote:

Originally Posted by cellarius (Post 2406901)
You should be able to do something like that at in a plugin on hook style_fetch
PHP Code:

if (THIS_SCRIPT == "test")
{
    
$styleid 4398;


Where 4398 of course needs to be replaced by the id of the style to be used, and THIS_SCRIPT needs to equal the constant you are setting on your custom page.

Thanks @cellarius for the information.

I found this thread also talking about the same thing I'm after: https://vborg.vbsupport.ru/showthread.php?t=267775

The one who asked the question in that thread mentioned the solution which is this code:

Code:

if (STYLEID == 1){
Code
}

And to be honest with you, my knowledge in PHP is not that good, but only html and css. so I'm wondering if you can explain where to place that code, please.

as you know in the custom page, which is html or php and the template that I can create from vb admin cp.... so where exactly should I insert that code?

looking forward to hearing from you :)

Digital Jedi 02-28-2013 06:55 PM

That particular link is not the same thing that cellarius posted. That's a plugin that would only execute when a particular style is used. Not the other way around.

In your Admin CP in Plugins & Products, you'll see the Add New Plugin option. You put the code there in a new plugin, and select the hook cellarius mentioned. You should remember what THIS_SCRIPT is, as it's what you changed one of the test lines to when you created your custom page.

brandondrury 02-28-2013 09:37 PM

Is there anything that has changed in vB4 over its progression that would cause the original code on the first page to not work?

I've used this as my starting point for an upgrade script I've had for years, but it stopped working and I'm trying to track down why.

I'm having the exact same problem on a clean local install of vBulletin.

Thanks!

Brandon

Lynne 03-01-2013 02:15 AM

There isn't anything in the first post code that has changed. If you need us to take a look at your exact code, you should make a thread in the vB4 Programming forum and post your php code and template code and let us have a link to your page so we can see what is going on.

fxdigi-cash 03-01-2013 04:05 AM

Quote:

Originally Posted by Digital Jedi (Post 2407052)
That particular link is not the same thing that cellarius posted. That's a plugin that would only execute when a particular style is used. Not the other way around.

In your Admin CP in Plugins & Products, you'll see the Add New Plugin option. You put the code there in a new plugin, and select the hook cellarius mentioned. You should remember what THIS_SCRIPT is, as it's what you changed one of the test lines to when you created your custom page.

Thank you so much @Digital.

That was clear.

I followed the steps you mentioned, but it seems there is something wrong with the style. I have tested the style on vb pages, but the custom page shows weird styling.... :confused:
it is like interaction between main style and other style.

by the way, in your code
Code:

if (THIS_SCRIPT == "test")
{
    $styleid = 4398;
}

"test" is for what?? is it customized page name or customized template name? sounds to me it is a page name ;)

any idea what's going on here?

Thanks

Digital Jedi 03-01-2013 04:38 AM

Remember in your custom page, where you changed the text in green?
Quote:

Originally Posted by Lynne (Post 1915364)
define('THIS_SCRIPT', 'test');

That's THIS_SCRIPT. Whatever you changed test to, is what you use in the plugin.

Can you link us to your page so we can see exactly what you mean by interacting?

fxdigi-cash 03-01-2013 06:21 AM

Quote:

Originally Posted by Digital Jedi (Post 2407131)
Remember in your custom page, where you changed the text in green?

That's THIS_SCRIPT. Whatever you changed test to, is what you use in the plugin.

Can you link us to your page so we can see exactly what you mean by interacting?

ok, great. Thanks again.

for the style, I made actually a little mistake.... forgot to clear the browser cache and that's why the style was messy.... :D

Thanks again. That was very helpful

P.S: I found here at vbulletin.org a mod that let admin to use a global custom footer, any idea if this can replace $footer or {vb:raw footer}


All times are GMT. The time now is 01:12 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04215 seconds
  • Memory Usage 1,754KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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