Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-05-2002, 01:26 PM
Shepski Shepski is offline
 
Join Date: Jul 2002
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Parse Forum username to an external page

I am going to be running competitions on my site but I only want people with a minimum amount of posts to be able to enter. For this I am thinking about parsing the logged in username from the forum to the external php page, then doing a db lookup on the name to check they have enuf posts. What is the best way of achieving this without giving the user the ability to change the username whilst its parsing accross?

thanks
Reply With Quote
  #2  
Old 08-05-2002, 01:42 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

best way:

require the global.php in your script, then you can use all vb-functions and the bbuserinfo variable.
Reply With Quote
  #3  
Old 08-05-2002, 02:08 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Or if your custom pages are in HTML (not PHP) use Webtemplates, post your non-vb page's HTML code in a webtemplate and in the same webtemplate use

[[($bbuserinfo[posts]>X]]
The text/page/HTML you want to display to your users who has more than X posts
[[/($bbuserinfo[posts]>X]]

line and you would achive your goal without writing a single line of code..
Reply With Quote
  #4  
Old 08-05-2002, 06:54 PM
Shepski Shepski is offline
 
Join Date: Jul 2002
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have installed the webtemplate hack but I seem to have 2 problems:

1.) when I logout it doesnt clear my cookie so I am still logged in.

2.) When I goto the URL show.php?pg=Webqueryhelp or show.php?pg=Webtemplatehelp as stated in the install file it tells me :

The page you requested does not exist!

Please check the address you want to visit. If you arrived this page by clicking a link inside this site, you may notify the Site Administrator about the broken link. Thank you!

Any ideas?
Reply With Quote
  #5  
Old 08-05-2002, 07:13 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1- This problem is not related to the hack. It's a vb/browser problem which sometimes happens. You need to clear your cookies manually once, then it will be fixed.. This cant be hack related because the hack does not change log-out sections of vb (in fact it does not change ANY part of vb, it's an independent script) and when you try log-out you still interact with default vb script.

2- Yes because your address is wrong. It should be:

show.php?pg=webquery_help

and

show.php?pg=webtemplate_help



3- After you fixed these issues, login to your CP, Choose Add new Webtemplate, paste your HTML source of your page into the box add the conditional I referred in the below message and you are done..

If you want to disable this page to non members add:
[cantsee]1[/cantsee]
to any part in the webtemplate, and now your page will be displayed to board members only..

Enjoy..
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 07:57 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
  • Page Generation 0.05124 seconds
  • Memory Usage 2,199KB
  • Queries Executed 13 (?)
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
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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