Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #361  
Old 19 Aug 2010, 20:47
nymyth nymyth is offline
 
Join Date: Jun 2002
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
Reply With Quote
  #362  
Old 19 Aug 2010, 23:11
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by nymyth View Post
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
Probably in your php code you would have a counter and then based on whether it's even or odd, you set the class (alt1 or alt2). This thread is really not the place to ask about how to write the php code though. You could probably find it doing a search though since it's been posted a few times.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #363  
Old 20 Aug 2010, 05:56
Frank T Frank T is offline
 
Join Date: Jun 2010
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');

Last edited by Frank T; 20 Aug 2010 at 06:25.
Reply With Quote
  #364  
Old 23 Aug 2010, 14:43
sbsforum.us sbsforum.us is offline
 
Join Date: Feb 2009
Thank you very much this is exactly what I needed!!!
__________________
The new Android Forums & News!!
Reply With Quote
  #365  
Old 25 Aug 2010, 15:14
tech4c tech4c is offline
 
Join Date: Jan 2009
Real name: Homoud
thanks
Reply With Quote
  #366  
Old 28 Aug 2010, 22:37
tzelon tzelon is offline
 
Join Date: Aug 2010
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
Reply With Quote
  #367  
Old 28 Aug 2010, 22:59
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by tzelon View Post
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
Widgets go in the CMS. You can't add them anywhere else, just as you can't pick a CMS layout for your page either. However, your page is just a template so you can lay it our however you want - even if that means copying a CMS grid and putting it in there.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #368  
Old 28 Aug 2010, 23:46
tzelon tzelon is offline
 
Join Date: Aug 2010
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by tzelon; 29 Aug 2010 at 19:21.
Reply With Quote
  #369  
Old 01 Sep 2010, 23:54
yospeck yospeck is offline
 
Join Date: Apr 2010
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 ).

Anyway, again, great great guide and in the main really simple to do (even for a none-coder like myself). Kudos!
Reply With Quote
  #370  
Old 05 Sep 2010, 20:18
Guitar Guy Guitar Guy is offline
 
Join Date: Feb 2010
Quick Question

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?


Regards,
Guitar Guy
Reply With Quote
  #371  
Old 05 Sep 2010, 21:50
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Guitar Guy View Post
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?
What your output looks like is in the html, so it is in the template. Usually users use CSS to put a border around a div. The shadow is also just CSS that you would apply to the div:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #372  
Old 06 Sep 2010, 04:01
Guitar Guy Guitar Guy is offline
 
Join Date: Feb 2010
Expansion Upon My Question

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:




into sections that look like pieces from the "What's Going On" box:




Here is the code that I currently have for the page:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I basically want to have pieces like the "What information do we collect?" and "Why do we collect this information?" in that box, etc, etc

Thank you in advance for your help.

Regards,
Guitar Guy
Reply With Quote
  #373  
Old 06 Sep 2010, 04:35
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #374  
Old 06 Sep 2010, 11:26
Dusty Miller Dusty Miller is offline
 
Join Date: Jan 2006
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.
Reply With Quote
  #375  
Old 06 Sep 2010, 14:48
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You can insert the php code anywhere under where it says Main Script and before your template is being rendered.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:02.

Layout Options | Width: Wide Color: