![]() |
|
Article Options |
#31
|
||||
|
||||
this help a lot thanks
__________________
Available for help just PM details! ![]() No members have liked this post.
|
#32
|
|||
|
|||
Can these instructions be take a little further so the following can be done. When making a template, can that template include a variable that can be entered somewhere in the admincp? For example I want the temple to show "THIS". The only thing is I do not want to go to the template all the time and edit "THIS". Can I make a little addition to the admin CP so I can specify what "THIS" is?
Also, can all these template hooks, templates and all related to me showing "THIS" be saved in one package like a mod is so It can be uploaded to another forum easily? Thanks No members have liked this post.
Last edited by kronnos; 06 Apr 2009 at 19:48. |
#33
|
||||
|
||||
Thanks for this guide. Indeed good tutorial.
I've crossed into weird thing though (vbulletin version 3.8.2), maybe someone came aross it & can give few tips on what i could have missed - i can't get rid of "uncached template" warning eventhough I have plugin on "cache_templates" adding it to $globaltemplates[], so not sure what am i missing. No members have liked this post.
Last edited by IdanB; 12 Jun 2009 at 13:06. |
#34
|
|||
|
|||
what hook are you using and whats the plugincode?
nobody can help you without that infos ![]() No members have liked this post.
|
#35
|
||||||||
|
||||||||
2 plugins:
1] location: "global_start" name: "alt_lp_template" with followign code:
2] location: "cache_templates" name: "Tempalte Cache" with followign code:
and on forum i keep getting "uncached template" warning for "alternate_view". Note this template was added to master style. EDIT: what's more weird, i know it's cached, as later on i can access it from $vbulletin->templatecache['alternate_view'] No members have liked this post.
Last edited by IdanB; 12 Jun 2009 at 13:14. Reason: more |
#36
|
||||||||
|
||||||||
You have to make it this way:
to cache it:
and save the content from the template into a variable:
Now you can use $varname No members have liked this post.
|
#37
|
||||
|
||||
thanks, that solved it, wrote under cache name the var name instead... silly me
![]() No members have liked this post.
|
#38
|
|||
|
|||
Excellent Post. Including my Javascript php file worked in parse_templates rather than cache_templates.
__________________
FlaForum.com :: Connecting Florida's Cities No members have liked this post.
|
#39
|
|||
|
|||
Hi Everyone,
Lets say I set some variable: $domain = "testsub.domain.com"; from within a global_start plugin. SHOULD I be able to use this in any template?? I seem to have very mixed results. Some pages with links that contain this domain are just broken... Any ideas? No members have liked this post.
|
#40
|
|||
|
|||
No, some templates are called from functions/methods, so you would have to create plugins to make your variable in the scope there.
You could write your variable into $vbulletin['myvarname'] = 'foo.bar.tld'; because $vbulletin should be everywhere in the scope. I hope you can understand what i mean No members have liked this post.
|
#41
|
||||
|
||||
Hi all,
I have tried this and it works good however it only works within vb if I try to use the same template in vba it does not? any help will be appreciated Product: vBulletin Hook Location: global_start
No members have liked this post.
|
#42
|
|||
|
|||
global_start is too early
try global_setup_complete instead No members have liked this post.
|
#43
|
|||
|
|||
Hey ragtek,
Still not working if i use this $adv_portal_rotating_articles in forumhome or any vb page it works fine but not in vba --------------- Added 04 Aug 2009 at 19:42 ---------------
Originally Posted by Omar Al-Ansari
ok nevermind I got it working .. ![]()
![]() it should be defined through CMPS CP No members have liked this post.
Last edited by Omar Al-Ansari; 04 Aug 2009 at 19:42. Reason: Auto-Merged DoublePost |
#44
|
|||
|
|||
or also $GLOBALS[adv_portal_rotating_articles] should also work
![]() No members have liked this post.
|
#45
|
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Originally Posted by iVox
I'm a little confused. The code in this post makes very little sense to me. Is it still valid?![]()
Originally Posted by IdanB
![]()
Originally Posted by ragtek
![]()
Originally Posted by IdanB
Can you explain exactly what you did to fix this? Did you still need the eval() code?![]()
I can get the contents of my test template to show, but it escapes my quotes within my HTML, so no styling is applied. ![]() --------------- Added 12 Oct 2009 at 12:11 --------------- Here's the code that I used: 2 plugins: 1] location: "global_start" name: "test_template_plugin" with followign code:
2] location: "cache_templates" name: "Cached - test_template" with followign code:
Like I said, I can see my content, but quotes are escaped, so no styling is applied. my template contents (test_template) (VERY simple)
What am I doing wrong? --------------- Added 13 Oct 2009 at 03:14 --------------- I was trying to follow the advice of the first post that I quoted, and it just didn't work. I changed the first plugin to include the eval() code for my variable, and it worked properly. ![]() Sorry for the bother. ![]()
__________________
Just a placeholder. ![]() No members have liked this post.
Last edited by Dax IX; 13 Oct 2009 at 03:14. Reason: Auto-Merged DoublePost |
![]() |
«
Previous Article
|
Next Article
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Article Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 05:16.