The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Okay, I search for such a hack, found a couple, some work, and others don't even make any sense.
Basically this is what I want: 1) Protect pages, so a user must be registered to view it. 2) Say I put a link on my front page that leads to a file... how do I block non members from clicking the link, so the download doesn't start and they get directed to the login/register page? 3) When they log in it directs them to the page they were trying to view. I have an idea how to do it, but I want to make sure I am choosing the right method. I know I would need to put something like this in the head section of the page I want to protect: <?php chdir("forums/"); require("global.php"); if ($bbuserinfo[userid]==0) { blah, blah.. ?> am I close? ![]() my main focus it protecting links so people can't download my files if they aren't registerd. thanks. |
|
#2
|
||||
|
||||
|
Yes...
Code:
<?php
chdir("./forums");
require("./global.php");
if ($bbuserinfo[userid]==0) {
show_nopermission();
}
?>
![]() Satan |
|
#3
|
||||
|
||||
|
Hmm.. getting include errors.
This is how I have my pages: Code:
<?php
include("../config.php");
include("../header.php");
?>
// content
<?php
include("../footer.php");
?>
Code:
<?php
chdir("./forums");
require("./global.php");
if ($bbuserinfo[userid]==0) {
show_nopermission();
}
include("../config.php");
include("../header.php");
?>
// content
<?php
include("../footer.php");
?>
|
|
#4
|
||||
|
||||
|
okay apparently i need more code than just that....
I only got it to work by setting FULL path starting from /home ![]() and after I tried to view the page it inserted the VB login page INSIDE the non VB page LOL it was messy, broken images etc.... I found this hack but it's way sloppy: https://vborg.vbsupport.ru/showthrea...threadid=36934 how do I protect links like attachments? so people can't download the files that are on no vb page? |
|
#5
|
||||
|
||||
|
you can't protect those files really, except if you save em into the db as attachments
|
|
#6
|
||||
|
||||
|
Sure you can.
You can put them outside directory-tree that comprises your web-space and have some php-file output them. I imagine this is exactly what PPN's 'attachments as files'-hack does. |
|
#7
|
||||
|
||||
|
Xenon, where did your reply go? i got an email and i don't see it here
LOLsomeone try to make this hack, i know it's possible just don't have the knowledge. |
|
#8
|
|||
|
|||
|
Quote:
|
|
#9
|
||||
|
||||
|
so can you make a working hack?
|
|
#10
|
|||
|
|||
|
<a href="https://vborg.vbsupport.ru/showthread.php?threadid=46963" target="_blank">https://vborg.vbsupport.ru/showt...threadid=46963</a>
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|