Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-14-2011, 06:14 PM
Nivec Nivec is offline
 
Join Date: Apr 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help adding custom pages.

Hi

Can someone please help me? A while back, I had some custom work done on vBulletin, can?t remember what version was used but it was early 2010 so version 3.x. I am now trying to install these customisations on version 3.8.7 PL2. I have the following instructions (After importing a product):
For applicable styles, open the template "header" and...
Find:
<li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:ra w bbuserinfo.logouthash}" onclick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
Add Below:
<li><a href="./misc.php?do=games">Games</a></li>


In the new version, the header template does not contain the code mentioned above, I can?t find it in any template. The closest I can find is the navbar template. I added my line as per the above instructions but it did not really work, the menu item did not display correctly and when clicking I just got a HTTP 500 (The website cannot display the page) error.

I messed around a bit and changed the line I am adding to:
<if condition="$show['member']">
<td class="vbmenu_control"><a href="./misc.php?do=games">Games</a></td>
</if>


With the above, the menu item displays correctly and only when a user is logged on, which is what I require. But still, just get the HTTP 500 error when clicking on it.

I am now lost, has the misc.php changed, how to I call my page?

Thanks
Reply With Quote
  #2  
Old 09-14-2011, 07:59 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, to start, what is the URL of your game's page versus what page is opening up when you get the 500 error? The error should be showing up in your error logs, presuming your host gives you a way to access them.
Reply With Quote
  #3  
Old 09-14-2011, 10:10 PM
Nivec Nivec is offline
 
Join Date: Apr 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no page that I upload, when importing the “product” using product manager, site templates are created and db tables are created. The URL in IE is “.../misc.php?do=games” after I click on the link. I have set this up on my own machine so full access. I am using IIS with win7, php, mysql, etc. Where would I find the logs you mention?

I don’t understand the relationship between “misc.php?do=games”, what is the “games” referring to? Is it my product ID, a PHP page. If I understood what do=games does it may help me troubleshoot it further.
Reply With Quote
  #4  
Old 09-15-2011, 03:35 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, if you don't know what page the link is supposed to go to, I can't really tell you. I presumed since it was called games, it was some page you wanted linked in your navbar to a page about games. The part after the equals is completely arbitrary. It's whatever you or the designer of the page decided to name it. There is no built in vBulletin page named that. It's probably from a modification that you no longer have installed, or installed improperly. You'll have to figure out what it is you were adding the link for to begin with before we can know how to fix it.
Reply With Quote
  #5  
Old 09-15-2011, 07:25 AM
Nivec Nivec is offline
 
Join Date: Apr 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, my heading is probably misleading.
If I look at some other default “pages” within vb, like the “new posts” link, it goes to a link called “…/search.php?do=getnew”. As far as I know, “getnew” is not a physical php file on the server, the page is built using various templates, etc.

My page is also not a physical file, it is built using 4 templates that are created when importing the product. They are “game_header”, “game_index”, etc.

So my question is, like in the example above, what does “getnew” refer to? If I knew where to find “getnew” then I would know where to find or add “games” in my site.
Reply With Quote
  #6  
Old 09-15-2011, 03:40 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"getnew" is the "do" variable that is being passed. Probably in the code somewhere, you will see something about $_GET['do'] or $_REQUEST['do']
Reply With Quote
  #7  
Old 09-15-2011, 05:27 PM
Nivec Nivec is offline
 
Join Date: Apr 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, yes, I found the following code in a Plugin that is also created when I import the Product:
if($_REQUEST['do'] == 'games') {
?.
?.

Ok, so it starting to make a bit of sense to me, everything seems to be in place, templates, plugins, etc. The page is just not working. I am thinking it is a vb version thing.

For the life of me I cannot find the code (mentioned in my original post) that I am supposed to place my menu item under.
Does anyone know where this code is, has it been removed with one of the version updates?
<li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:ra w bbuserinfo.logouthash}" onclick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
It is driving me nuts, I have done this before and it worked fine, the only thing probably different is the vb version and I unfortunately cannot remember what version this customisation was developed/tested on.
Reply With Quote
  #8  
Old 09-15-2011, 05:41 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're not trying to make a 4.x modification work with a 3.x installation, are you? The first block of code you posted is for vB4, which is why you can't find it in your vb3 forum. vB3 doesn't use {vb:raw} at all, nor <li> for menu items. If you're getting an Internal Server Error, then that's probably why.
Reply With Quote
  #9  
Old 09-15-2011, 08:46 PM
Nivec Nivec is offline
 
Join Date: Apr 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am pretty sure it was not version 4, I don?t own a version 4 license and have always worked with just version 3.x. Having said that, I just installed version 4 and was able to get it to work.

From what you are saying about the {vb:raw} and <li>, then it must have been version 4, in which case .

Time to upgrade my license.
Thanks for the time guys.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 10:31 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
  • Page Generation 0.04012 seconds
  • Memory Usage 2,239KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete