What code can I put into the template so that I can have alternating colors. I will listing links from top to bottom and I would like each link to have a different bg color like we do in forumdisplay
|
Quote:
|
I ran into a wierd problem programming my own custom page. I wanted to add a note to the bottom of a screen to see what infraction a user received. So, I thought I did the obvious: $vbphrase['infractionlevel8_title'] -- and to my surprise, it was blank (even though it's actually defined).
Next, I copied the vbphrase precache out of infraction.php: $phrasegroups = array('infraction', 'infractionlevel', 'pm', 'posting', 'banning', 'user'); Nothing. I made sure vbphrases are working, because I successfully displayed $vbphrase['forum']. I worked on this for a few hours and couldn't figure it out. What's so unique about these infractionlevel phrases, and why can't I get to them from inside of my custom page? Any help is greatly appreciated. Fixed by calling fetch_phrase_group('infractionlevel'); |
Thank you very much this is exactly what I needed!!!
|
thanks
|
Thank you !
I have 2 qustions: Can I add widgets to my new page? How can I do that ? Can I choose layout to the new page? THANKS AGIN |
Quote:
|
Ok
thanks. I have new problem, in my computer the new page is working but in others computer they see blank page. this is my php code of the page PHP Code:
|
Excellent guide (combined with the adding the nav tab dropdown menu guide Lynne).
I'm an absolute code n00b and don't don't know a condition from a variable to a hook, basically jumped in feet first and just trying to learn this stuff as I go. My only criticism (and I hope it's constructive) is that some of these guides are written for people who actually know where to navigate in the admincp and where to add new styles/templates, etc. There's as many new people coming to these forums learning coding and vBulletin for the first time and although I know you guys do your best to try and make things basic, sometimes it can be with presumed knowledge. With just a few more simple initial babysteps (given that topics like this are likely to be one of the first things someone wants to do with their site, and therefore might have very little prior knowledge of vBull and how to do any coding) it would be sooooo helpful to have a "to do this you go to here > here > here" in the OP instead of working through the entire thread to find out the info (which I generally do as I don't like to ask questions that are answered in the thread, it can just sometimes be a pain when it's on page 16 :D ). Anyway, again, great great guide and in the main really simple to do (even for a none-coder like myself). Kudos! |
Hello,
First off, I just want to say that this is a top-notch guide, in my opinion. I just have a quick question: How do I add dividers to sections? Is it in the template? Or the PHP page? What's the code? Also, How do I add the shadow effect behind the whole box? http://img541.imageshack.us/img541/2458/wgobox.jpg Regards, Guitar Guy |
Quote:
HTML Code:
div.yourclass { |
Thank you for the response, but it's not entirely what I'm asking.
What I'm trying to do is basically divide this page: http://img299.imageshack.us/img299/6...policypage.jpg into sections that look like pieces from the "What's Going On" box: http://img715.imageshack.us/img715/9...goingonbox.jpg Here is the code that I currently have for the page: PHP Code:
Thank you in advance for your help. Regards, Guitar Guy |
If you want to make your page look more like the other section, then you need to use the same sort of CSS for your page.
|
Is there a way of adding php scripts in a custom page. I am trying to add a form in which people can add search their details and I want to query an external database...
Where should the php code be inserted.. I want to user the vBulletin wrapper to control users, usergroup levels etc. |
You can insert the php code anywhere under where it says Main Script and before your template is being rendered.
|
noob question, sorry... if I want to place a little javascript on my page(basically a calculator) where do I place the code that would normally go within the head tags?
|
Quote:
|
well yea. That gives me errors, which is why I asked. I had it as an shtml page already, so I'm just attempting to copy and paste working code.......
Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3332 vBulletin Message The following error occurred when attempting to evaluate this template: %1$s This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. |
You may want to try putting <vb:literal> tags around the javascript and see if that works. If it still doesn't, you may want to start a thread in the general discussions area and ask for help with your code.
|
Putting those around the header portion of the code worked. Thank you :)
|
Hi... I understand that test.php should be put in the root /.
If I put the test.php in /folder/ should it work fine or I need to edit something? |
Quote:
PHP Code:
|
I am getting the following error when I go to the file:
PHP Code:
This is how I wrote the file: PHP Code:
|
Your vbforums are in a directory called /newfolder? You are supposed to chdir to the vbulletin forums directory.
|
Excellent, thank you!
--------------- Added [DATE]1284586523[/DATE] at [TIME]1284586523[/TIME] --------------- Question/problem 1) However if I put some text after this: PHP Code:
Code:
Parse error: syntax error, unexpected T_VARIABLE in [and then the line number of the code I put] --------------- Added [DATE]1284587127[/DATE] at [TIME]1284587127[/TIME] --------------- Questio/problem 2) If I stay on the page file.php for a bunch of minutes, and then I refresh the page, this is what I get: PHP Code:
|
If you are getting those errors, then you are creating your page wrong. You should start your own thread and post your php code and template code so someone may help you out.
|
Here it is: https://vborg.vbsupport.ru/showthread.php?p=2098965
Thank you for your help |
How can I use another template in the template for the new page?
Like this: HTML Code:
{vb:stylevar htmldoctype} "{vb:raw another_template}" should be replaced with the Template "another_template" Someone who understand my querstion? |
Quote:
PHP Code:
|
It works, Thanks!!
Have I to do this for every Template I want to use or is there a short version? |
Quote:
|
Ok, Thank You!!!
|
Hello,
how should the following look like if the file test.php is on the path http://mysite.com/custompages/test.php ? PHP Code:
PHP Code:
If I put HTML Code:
/custompages/test.php HTML Code:
test.php |
I love this tutorial but Im lacking of showing the latest threads on that Page.
I hope some has the php code for pulling the latest threads out |
Where do we put the text and custom code. Like html and text? I see an area that says to put your own custom code but I keep getting errors.
|
I have my forums located at root/forum
I have a shop that uses the software CS-CART (http://www.cs-cart.com) located at root/shop. It has its own index.php file What I would like to do is wrap a forum page, with the header and navbar, around the shop pages. I tried using this method and the template I created was an iframe but it isn't the best solution...for example click refresh and the iframe goes back to the shop home page etc. Can anyone advise what would be the best way to do this...thanks |
Hello everyone,
I tried to read this thread a little but honestly I'm lost ... :D I would need to insert a php code within a thread, you can do? |
Quote:
|
Quote:
I look for the solution ... even if I have not seen it yet |
Hi Lynne,
was it possible to use {username} on a custom site? I use them your way and would like to add {username} on one or two of my custom sites, like e.g. in the vB notices. Is there any chance to realize this? Thanks a lot! |
All times are GMT. The time now is 12:33 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|