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

Reply
 
Thread Tools Display Modes
  #11  
Old 07-23-2008, 10:36 PM
Chris11987 Chris11987 is offline
 
Join Date: Jun 2008
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Except for the actual content, the only things I need to edit there would be lines 4-6, correct? I know how to do 5 and 6, but what do I put in place of:

define('THIS_SCRIPT', 'MAIN_INDEX');
Reply With Quote
  #12  
Old 07-23-2008, 10:38 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would replace 'main_index' with a unique name for your script... Usually it would be the same name as the php file itself.
Reply With Quote
  #13  
Old 07-23-2008, 10:54 PM
Chris11987 Chris11987 is offline
 
Join Date: Jun 2008
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I get from that:

http://nintendohub.com/forumpage.php
Reply With Quote
  #14  
Old 07-23-2008, 11:01 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just tried it with an install of 3.7.2 as I haven't used that since 3.6 and it still works.

do you have the <?PHP at the very top of the page at line 0 with NO spaces before it? You cannot have any spaces or lines sent to the browser before you included global.php.

edit: I attached the php I just tested with. change the forum path in the chdr call
Attached Files
File Type: php test.php (521 Bytes, 3 views)
Reply With Quote
  #15  
Old 07-23-2008, 11:12 PM
Chris11987 Chris11987 is offline
 
Join Date: Jun 2008
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried again, and managed to get it to work, but it's still not using the css:

http://nintendohub.com/test2.php
Reply With Quote
  #16  
Old 07-23-2008, 11:17 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I looked at the source, its because you have VB storing the CSS in files and its giving you a relative path to the CSS file. So since the page is not in the forum directory the browser cannot locate the appropriate CSS file.

Someone else may be able to get this working with usiing external style sheets but I have never used that option.
Reply With Quote
  #17  
Old 07-24-2008, 10:18 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to put a base element at the TOP of your headinclude template (change URL to match your site). With this element, it also does not require images to have absolute paths.
HTML Code:
<base href="http://nintendohub.com/forum/" />
Reply With Quote
  #18  
Old 11-13-2008, 12:31 AM
rcull rcull is offline
 
Join Date: Feb 2005
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great!

I finally stumbled on to this suggestion (after days or reading and playing) and it seems to work with my very limited skills

I would like to have a condition of viewing the page, or at least some of the pages that I present with this. Neither of the statements below work for me, can you tell me what I am missing?


<if condition="is_member_of($bbuserinfo,5,6,7,9,10,13) ">
$vbphrase[not_yet_full_member]
<else/>
Welcome Back to the forums!
</if>


<?php
if condition="is_member_of($bbuserinfo,5,6,7,9,10,13) " {
?>
This is for a member<br>
<?php
} else {
?>
This is for a guest<br>
<?php
}
?>



Thanks
Reply With Quote
  #19  
Old 11-13-2008, 02:41 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where are you putting that code? In a template or a plugin. (Also, please use the code/html/php tags.)

The first one won't work because it is <else />, not <else/>. The second one won't work in a template because you can't put php in a template. It also won't work in a plugin because your if statement is incorrect.
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 12:11 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
  • Page Generation 0.06391 seconds
  • Memory Usage 2,255KB
  • Queries Executed 12 (?)
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)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete