[tip] Never underestimate the power of the phpinclude template
A substantial number of hacks at vBulletin.org could be completely ported to a pure phpinclude-based structure. The phpinclude template lets you enter PHP code that is parsed before virtually everything else; it does get parsed before every single template gets loaded.
phpinclude is critical if you want to add features with your template modifications. Most of my October/November template releases have required phpinclude. Also using phpinclude does not edit the actual PHP files and makes upgrading to the latest version of vBulletin extremely easy: just upgrade normally! However remember though that phpinclude is PHP code and can also compromise the security of your forums, just like any hack. For example, never do this: Code:
if ($condition) So use the phpinclude template but beware of the dark side. :) |
phpinclude is good for easy upgrading, but several hacks won't work through it. So depending on what hacks you use depends on if you can use phpinclude or not. Some are possible but alot harder to port. ;)
|
Can I use phpinclude to include a PHP page that is also dynamically generated from another database of the same local mySQL?
|
Is it part of the vB at all?
|
this is very interesting to me but my being a retard I have no idea how to go about utilizing this idea.
if you wouldn't mind helping the mentally challenged....would you tell me how you would make the quick reply hack by FireFly hack work by using the phpinclude template? I chose this hack to ask about because if someone could explain how to make this one work your way...I believe I could figure out how to do all og the others I use. thank you in advance |
If you're interested, take a look at this:
http://www.vbulletintemplates.com/mo...&threadid=2224 It makes phpinclude mods code a whole lot easier to mod. Hope it helps. :) |
thank you
|
No problem, glad to help! ^_^
|
I am making a classifieds area on my site but instead of hacking to do this I am using the existing forum scripting to accomplish it.
however...I have made a page to show the classifieds categories on and want to order them on the page the way I think they should look rather then one under the other like the forum list. anyway....can anyone help me with the code I would put into phpinclude to display the forum title then forum thread count and finally below that the forum description? I have been trying many things but am aparently php stupid thank you in advance |
so how come this doesnt work then
if ($bbuserinfo['userid']!=0) { eval("\$themeheader = \"".gettemplate("P_themeheaderLI")."\";"); }else{ eval("\$themeheader = \"".gettemplate("P_themeheader")."\";"); } yet works fine on the vbportal front end (remembering that vbp and vbb both use same user logged in details and in this case both use the same header pages) |
Provided you used it correctly, it does work.
|
thats whats confusing me it does work on some pages just not on others
ie: the login box swap works fine on all the portal pages but it refuses to work on the vbb its self. even though both pages load exactly the same header templates and both process the phpinclude template this is almost the last thing ive been stuck with and its confusing the hell outta me |
hinch: I did that same hack... But to the header code itself within vBP's files. I decided a code hack would work better than a template hack. Ironically, I'm getting to opposite of what you are -- The themeheader is only changed within vB pages. vBP pages show the default. So, I think a combination of both our hacks would create exactly what we need. :D
|
heh possiably
well the vbp header swapping works perfectly all i did was add the template called P_themeheadersLI (LI for logged in) then in header.php edited the line of code that just said eval("\$themeheader = \"".gettemplate("P_themeheader")."\";"); to now say if ($bbuserinfo['userid']!=NULL) { eval("\$themeheader = \"".gettemplate("P_themeheaderLI")."\";"); }else{ eval("\$themeheader = \"".gettemplate("P_themeheader")."\";"); } thats on line 50 or so of header.php so that should work for you fine. i think as for the vb one its self fancy giving me a clue im struggling to find even html in the vb files |
All times are GMT. The time now is 07:38 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|