PDA

View Full Version : Parse Forum username to an external page


Shepski
08-05-2002, 01:26 PM
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

Xenon
08-05-2002, 01:42 PM
best way:

require the global.php in your script, then you can use all vb-functions and the bbuserinfo variable.

Logician
08-05-2002, 02:08 PM
Or if your custom pages are in HTML (not PHP) use Webtemplates (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36419), 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..

Shepski
08-05-2002, 06:54 PM
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?

Logician
08-05-2002, 07:13 PM
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:
1
to any part in the webtemplate, and now your page will be displayed to board members only..

Enjoy..