![]() |
Uninstall vBSEO. :)
|
Quote:
Post the first few lines of that page so we can see whats happening. |
Hi,
I'm trying to use this in a page which contains other variables, but they're all being wiped. I've done some general reading on the VBulletin variable cleaning utility, but can't for the life of me figure out what I'm doing wrong. Basically an "id" variable is passed (using the "request" function) with the URL for a simple news script (news.php?action=viewnews&id=5) But with global.php (thus init.php) being used the variable is being wiped. How can I get around that? Code:
switch($_REQUEST['action']) { Thanks |
Nevermind, I discovered just how stupid I was being!
|
Quote:
|
I ended up putting the variable through the vbulletin variable cleaner which sorted things out nicely.
I'm able to log-in and out fine from any page with the includes, but when I attempt to use the user's name/id in the page then I don't get any result. I'm using the following code in the page: Code:
$member_name = $vbulletin->userinfo['username']; Code:
<?php |
Found the problem - it doesn't like being inside a function. Think I'm sorted now!
|
Ok well I keep on getting an error...here it is
Quote:
PHP Code:
I have tried to check it out, but I don't have a clue what it could be... Any help would be much appreciated!!! |
There should be nothing wrong with the functions.php file, the problem will be in the page that has called it.
Have you followed the steps in the troubleshooting guide? https://vborg.vbsupport.ru/showpost....79&postcount=2 Including step 5 with the test code. If you still have problems after this, please post the first few lines of the page you are trying to use this hack on. |
Is it possible to redirect back to the page you accessed the login form from? if so can someone please give me the code to edit?
Thnx |
HoG - this always redirects me back to the page from which our members log in.
QUESTION: How do I manipulate the size of the "Log In" button? I'd like to be able to streamline this hack so it fits neatly in a small area, and the button is quite large right now - can I adjust the size of it? |
Quote:
PHP Code:
|
Quote:
|
Quote:
login_inc.php find the line with // You can style this with html or CSS as normal if desired. and you will see the login form code. You can make the boxes smaller by editing size=10 and/or you can add css or html tags to format the text size/colour/font etc as desired. |
Quote:
Try changing that bit above to <?php $curdir = getcwd (); chdir('/home/gamesoga/public_html/forums'); require_once('/home/gamesoga/public_html/forums'/global.php'); chdir ($curdir); ?> If that does not work I suspect that your trying to use a variable named the same as a reserved vB one. |
Does this mod allow me to use the vB headers and footers?
|
Quote:
I havent looked into whats involved in calling the vB header and footer templates. |
Many thanks. This snippet allowed me to do something that I've been begging for support on vb.org for the past several months. Plus, it is super-easy to modify and customize.
My only question, is if you have a complete list of $vbulletin->userinfo[] variables that I can use in conjunction with this mod. |
This is probably a common request/hack so that is why I am describing what I have done.
I took Billspaintball's script for use as a single point login for my site, with the objective of not letting anyone into my entire site without the correct credentials/authorization. I want to permit access only to user groups 2,5,6,or 7 (registered users, moderators, and admins). www.mysite.com www.mysite.com/forums A page with Bill's script code sits at the root (index.php) and my forum is under /forums. If a non-authorized user comes along I want to bounce him/her back to the ROOT with a message. First I set the permissions of the usergroups to what I think they should be to stop them from getting nto my site at all, then I also use the following alteration of Bill's code on the root index page: Code:
if($isAdmin){ If I change the permissions and allow my defined set of unauthorized usergroups access to view forums the problem goes away. However, this defeats my goal in preventing these unauthorized users from seeing the forum in the first place and by typing in /forum they can view the forum homepage! Can anyone can shed light on this and help me achieve what I would like to do? Thanks! Jonathan |
Quote:
Any chance for a fix on this though? It would make templating much easier. |
Quote:
Great mod! You saved me a day of work! Brandon |
Quote:
Works for some, not for others :confused: Ive not been able to pinpoint why, but possibly something to do with server configuation I spose. |
would this work on vb 3.6.5 ?
|
nice hack, thanks for this! Question :D
Do you know of a way of displaying the person that is logged in "New Pms #" "New Posts #" |
Quote:
|
Quote:
https://vborg.vbsupport.ru/showthread.php?t=108026 Its under the vB 3.5 section but still works fine on the vB 3.6 series. |
Thanks alot Great stuff exactly what i needed/wanted :D. This is a great lil add makes the site feel more interactive O_O . Thanks alot Billspaintball
|
I am currently using this script & another script which requires for me to add this also <?php
chdir('./forums'); require_once('./vBExternal.php'); ?> But php wont allow me to add two require_once is there any way to get around this ? |
Quote:
There is a guide on using this script with vBexternal right here https://vborg.vbsupport.ru/showpost....&postcount=399 |
You guys say this should redirect me to the page that found the login page automatically right?
Well would that page have to be a native vBulletin page? meaning, I have my own pages that I am adding this to.... and when i click them, to get to my newly created page with this code on -- which does work perfectly by the way, it always redirects the users who login back to the now logged in login page...as opposed to index.php at my root for example.. mysite.com/index.php -- they click login, which takes them to mysite.com/login.php -- which neitehr of which are vBulletin pages yet.... so they login successfully, I see the vBulletin redireting message, and they are sent back to mysite.com/login.php not the index.php page I wanted to happen... is there some form of variable I need to include in the login.php link like ?prevousurl-index.php etc.... |
having a problem, im using this addon
I'm not a PHP PRO --- but now i can not use simple dynamic include urls (www.site.com?page=Staff) <?php $page = $_GET['page']; if (!empty($page)) { $page .= '.php'; i else { include('news.html'); } ?> when i delete global.php from require it works fine >< does anyone have any ideas? Thanks. |
Quote:
Im not sure if $page is a vB variable or not. If possible try renaming your variable to something different such as mypage and see if that fixes it. |
Quote:
|
ok i got a problem when im logged in to the forum everything works find but when im not logged in i get this error on my homepage.
Unable to add cookies, header already sent. File: /home/gamer/public_html/index.php Line: 11 this file is a encoded script by the author so i am lost. why does it give me this error only when im not logged in? |
ok i fixed the last issue now im having another issue when i try to login i get this in my Address bar and it doesnt log me in
http://www.gamersiege.com/index.php?...5password_utf= changed personal info for apparent reasons Fixed that had a open form on the page now im getting the infamous Fatal error: Call to a member function on a non-object on line 150 ok before i get the normal response i have tried everything as requested. http://gamersiege.com |
Can you post the code for your login_inc.php file.
|
PHP Code:
|
Looks like you have it all fixed now.
I created an account on your forums and logged in and out ok. What was the problem in the end? Account I created was billtest, you may want to delete it now. |
I removed this part of the code
which i really wanted to use. and wish i could still use PHP Code:
im using 3.6.5 |
good stuff :D
Tagged for future use |
All times are GMT. The time now is 01:37 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|