![]() |
Idiot Admin PHP
Ok, so I really hate the way the templates are handled with plugins / products and everything. I want to have a simple setup that I can use to add new pages to my site but it constantly seems so complicated.
Can't there be an easy way of just having a php page that says: Code:
<? As a site administrator, I can't stand how hard it is to do version control in development. So much of what makes the site tick is in the database and tracking incremental changes so I /or my staff can find what was changed when and what might have broken things is pretty hard. If vB would implement something like above, I might actually be able to find php developers who don't have to deal with such a large learning curve, do subversion checkin / checkout and so much more. I have one great vBulletin developer that has been with me for years, but finding another has been miserable, and trying to learn it myself is even worse which is making me want to switch platforms. |
<a href="https://vborg.vbsupport.ru/showthread.php?t=228112" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=228112</a>
|
Thanks Lynne, I tried using that page to create the pages I wanted so I could do standard include(); I got the header to display, but couldn't get the header and navbar to work when I did:
<? include("./header.php"); include("./navbar.php"); ?> I created some templates called idiotadmin-header and idiotadmin-navbar and left the appropriate code in each. I tried this for header.php Code:
<?php Code:
<?php |
1 Attachment(s)
You're going about this in the wrong way. The template lynne gives you, gives you the ability to build vBulletin pages. The vbulletin way, you're coming at this kind of sideways, in a way we wouldn't normally do this
You really want something closer to this Code:
<?php Defines what the page is (this_script) Requires the needed phrases (we didn't do that here, since we're not using any) Registers the templates that will be used on the page, these global templates at the top tell the software it needs these templates, so the software will get them all, instead of having to query for each template. Requires the needed files. Set's up the navbar Set's up the page title betwee the navbar stuff, and the page output stuff, you can do a lot of things. But if you just want a custom page, this is it And then finally renders the templates. Next, you'd add a new template in the software, based on my example it'd be mypage, AdminCP > Styles & Templates >STyle Manager > Add New Template I've added the templates, and my custom html, stuff in it, and saved. Now it actually is a real page. I did this pretty hastily, so I think I didn't get the navibts part right, but that is something I think with some trial and effort, and help from others, you should be able to nail down. |
Thank you so much for your help. I "learned" PHP about 15 years ago and am trying to get better but it seems so complicated when I am trying to figure out which problems are from php and which are vbulletin related. I have been running my vbulletin site for about 8 years and it has been heavily modified by Tigga (from vbadvanced) for the last 4 years. As much as I love everything he does, occasionally though I want to do something myself and get stuck over and over till I give up and outsource it AGAIN and AGAIN.
What am I supposed to do when I want to run PHP code? For example I want to create a page that has this code in the content area: Code:
<?php <? include("./globals.php"); include("./header.php"); include("./navbar.php"); // Above code goes here include("./footer.php"); ?> It just seems like a really complicated way to produce pages with a lot of going back and forth. It is making more sense why I have pages with 3000-4000 lines of code written by my programmer with tons of [if ($_POST['do'] == xxx] statements just to avoid dealing with vbulletin. |
The entire snipet of code I gave you, is an ENTIRE page, in php.
Look at forum.php or showthread.php .You don't require a header.php opr navbar.php. It is its own page, and does its own things. Step 1: create mypage.php file on server with my code as above. Step 2: Create a template called mypage in the style manager Step 3, pull up domain.com/mypage.php on your site/server |
Ok so, I might be close. Looking at a page on my site I came up with the minimal code needed is this:
Code:
<?php Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
Thank you so much RichieBoy, that is an awesome mod which I will definitely make use of. While fidgeting with everything, I finally found something that works:
Code:
<?php |
All times are GMT. The time now is 01:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|