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 07-09-2002, 07:40 PM
thorin thorin is offline
 
Join Date: Jun 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Using vBulletin Cookies Outside the Fourms

I want to use the login cookie method for security outside of my forums area. What do I need to have in my files to make this happen? I am running in 100% php so this should be a pretty simple one for you guru's.

Here are the details:

The forums are located in a directory below the main site: "http://www.site.com/users/forums"
I want a login prompt at "http://www.site.com" and then proceed to "/users" once they have logged in using the vubulletin user db.
Reply With Quote
  #2  
Old 07-09-2002, 07:49 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont thing so. Unless you set up a multi domain cookie but it could be very un-secure.
Reply With Quote
  #3  
Old 07-09-2002, 08:02 PM
thorin thorin is offline
 
Join Date: Jun 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is all ONE domain.

http://www.site.com
"/users" and "/users/forums" are all directories below "site.com"
Reply With Quote
  #4  
Old 07-09-2002, 09:12 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
I want to use the login cookie method for security outside of my forums area.
cookies are neither good nor sufficient tools for security. What if user disabled cookies in vb settings or in his browser settings?

If you need to secure your non-vb pages according to vb user/usergroup info, give WebTemplates hack a shot.
Reply With Quote
  #5  
Old 07-09-2002, 09:41 PM
thorin thorin is offline
 
Join Date: Jun 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WOW man, nice work, but its a lot more than I need. Do you have a stripped down script to do this? I don't need to be able to edit the pages and that from the forums, just the login prompt if they haven't logged in already.
Reply With Quote
  #6  
Old 07-10-2002, 05:38 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont have a "light" version but I think it's not necessary either. I know the hack seems complicated but in fact it is not. After installation, all you have to do is to click ADD WEBTEMPLATE button, give it a name and copy/paste your non-vb page's source code inside it. Then put [cantsee]0 1 3[/cantsee] tag inside your webtemplate and you are done.

Now only your registered members (who also verified his email) can see your webtemplate, if he is not a member or he is a logged off member, webtemplate will automatically display him the login/register screen.

So it is really very easy to use..
Reply With Quote
  #7  
Old 07-10-2002, 06:17 PM
thorin thorin is offline
 
Join Date: Jun 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, do you have a working example of this somewhere I can see, I don't quite understand how the template is incorporated into my php files. I have 3 files per page, one is the header inculude, the other is the footer include and then the contents. so would the pages become dynamic?
Reply With Quote
  #8  
Old 07-10-2002, 08:29 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You tell me what do you have in your PHP file (content) and I'll tell you if you can convert it to a webtemplate.

Webtemplate hack comes with 2 default webtemplates "header" and "footer". You can customize them as you like then you add $header and $footer variables into your other webtemplates to include headers and footers to them.

As for the content page: If it is a static HTML page, all you have to do is to copy/paste its source code and now it becomes a webtemplate. Of course it's address changes: you now call it as yourboardurl/show.php?pg=yourtemplatename

If it's a dynamic PHP page which makes queries to MYSQL and get/post results on the fly, you can convert most of your queries to "webqueries" and insert into your webtemplates. For example if you have a query to list last 10 registered users of your board in your PHP file, you create a webquery named "_last10users", form the SELECT code and then insert "$_last10users" variable in any place in your webtemplate and while it's parsed it will retrieve data from MYSQL and automatically list the last 10 users.

But if your PHP does more than that (eg. gets/list 10 item from db, then puts a link to get 10 more) you may not do it with the hack.

There are some screenshots in the hack thread. If you want more, tell me what screenshot you exactly want.
Reply With Quote
  #9  
Old 07-10-2002, 08:56 PM
thorin thorin is offline
 
Join Date: Jun 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All the content is plain html, nothing fancy, I would like to get more in there as far as dynamics (how many people on the board, hot threads and last thread, newest member....etc) but that will come later, but I am thinking this will do it all, I am just a little warry about how it will work out, I don't have time to be a php programmer, but enough time to make it work the first time, its a tuff mulit-hat job I have.
Reply With Quote
  #10  
Old 07-10-2002, 08:57 PM
thorin thorin is offline
 
Join Date: Jun 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so a page url would look like "site.com/index.php?pagename"
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 05:07 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.06157 seconds
  • Memory Usage 2,247KB
  • 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)bbcode_quote
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete