HTML - Redirect If Session Cookie For Phpbb Isn't There
Hi, not sure weather this is the right category because it is related to phpBB but I Have tried there forums, with no luck! I think I'm in the right section though.
Basically, I am building in the sessions and users of my forum into my personal site. I am using the following script to check if users are logged on: Code: <?php define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../computerhelp/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); ?> Your existing page goes here <?php if ($user->data['user_id'] == ANONYMOUS) { echo 'Please login!'; } else { echo 'Thanks for logging in, ' . $user->data['username_clean']; } ?> I want to redirect visitors to a page on my site if they are not logged on, but can not figure out how to do it. Please can someone help me? Similar TutorialsHello everyone, ! Im trying to create a new area in a forum for advertising and so on. I use phpbb scripts that use stylesheets and html so not sure where to go for this help. I have a site which you can see a jpeg he now I want to change it to this: any help or suggestion on where to start on this would be terrific? Hello again htmlforums and members, It has been 6 months since i uploaded phpbb3 to my domain as just a forum and still i want to remain a forum but i need a landing_page. I have finished the html and css in dreamweaver now i just need to be pointed the right way on where to upload my page and how to make it my domains first page or "squeez_page" thanks in advance... -tikki- Hi everyone, I need some help! I have a forum, as well as a separate website. I would like the homepage of my website, to have "recent posts" section, from the forum. I know it's possible, i've seen it on many sites, can somebody help me out? Thanks! Hi all, Here's the site I'm working on www.davidakerman.com.au/ukulele And I want to incorporate this forum (have only just installed it), into here... http://www.davidakerman.com.au/ukulele/sites.html ...so that it sits inside the blue panels where the text currently is. If anyone can help out it'd be much appreciated. Thank you. Ok, This might be a bit confusing but ill try my best. On my main website homepage i have a splash image which when clicked redirects to the main website, also in another folder i have a phpbb3 Forum. Below the image on my homepage i have a login box for the forum as well. What i would like to do is to hide that login box unless a keyword is entered before hand, and make the domain.com/forum URL inaccessible unless you login through this route. basically hiding the forum completely so people dont actually know its there. I could do this through .htaccess however i was hoping there was a "cleaner" way to do this. Many Thanks Rob On my website (www.mysite.com), when a user clicks on the register link, a new window opens that takes him to another domain (www.myreg.com) where he can register. When he's finished registering, the myreg.com window is closed. The requirement is that when he's finished registering, I need the myreg.com page to set a cookie somehow for www.mysite.com . Is this possible? Cheers, James Hi, I don't really know html, I have messed around with it and looked at some scripts; I have some understanding of a couple of langauges, but... lets say I'm a beginer. So... I have a website which is designed with WYSIWYG Web Builder and plan to do more advanced things with it. One of the things I plan to do is put a popup for a poll I have created on my hompage. But so users dont get annoyed by the popup everytime they visit I need a Check box; and when ticked sets a cookie to stop the popup coming up. Seen as I'm new to html code I would like the full code/script and maybe instructions please! Can you delete cookies using html? if so how? or does someone know an easy way to add a delete cookie function to my script? i need some sort of function or something that deletes logged_in preferably in a link or something so that i can chose when to delete it. script is as follows: HTML Code: <html> <head> <title>Cookies Script Test</title> <script language="javascript"> function createCookie ( name, value, expires ) { var today = new Date(); today.setTime( today.getTime() ); expires = expires * 1000 * 60 * 60 * 24; var expire_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expire_date.toGMTString() : "" ) } window.onload=createCookie( "logged_in", "YES", 1 ) </script> </head> <body> </body> </html> Thanks in advance, -uberwalla o and also if anybody knows an easy way to check to see if a cookie exists and do the following thatd be great: 1) check if it exists, and if it does null (do nothing) 2) if it doesnt exists redirect to a certain page (login.html) Hi There, I need some help creating a html cookie that collects information from a registration form I created in HTML. I then need to take that information and populate another form which is an invoice. So far I haven't been able to accomplish this on my own because I have the Regform.html, which already post info to a regform.php (this is what generates an email to me with the registration info). It is on that regform.php form they have the option to have a invoice created. Since I can't nest forms together I have to use this cookie method. The html cookies I have found online have not given me anything more then the generic cookie in which to place on someones pc. No knowledge of JS doesn't help. These are the fields below that need to link from the regform.html to the invoice.html form. I just realized that I have multiple lines on the invoice for multiple registrants but the same is not true on the regform. Even if I could get the first group of info to carry over, I could then edit the regform to add multiple registrants on the next lines. www.ahtcsonline.com/regform.html www.ahtcsonline.com/regform.php www.ahtcsonline.com/invoice.html Which Class: -drop down- Date of Class: # of Attendees: -drop down- Attendee Name: E-Mail: Company:* Address:* City:* State: -drop down- Zip:* Phone:* My page is trying to set some cookies with semi-colons in some of the values, but (in Firefox) they are not being saved correctly - the saved values are being truncated at the semi-colon... (So, for example, instead of saving the value "name;age;" in the cookie, only "name" is being being saved. Presumably, you aren't allowed semi-colons in cookie values? Does anyone know what other characters are not allowed? Thanks, James hi peeps. i have a page where there is a selection box and the different choices give a different background in a certain div. please could somebody tell me how i would store that info in a cookie so that when the page changes, the background image stays the same? heres the link to my site if it helps: samsharples.com and here's the code HTML Code: <form action=""> <select onchange="changeDivImage(this.value)"> <option>Choose your favourite team</option> <option value="arsenal.png">Arsenal</option> <option value="aston_villa.png">Aston Villa</option> <option value="birmingham_city.png">Birmingham City</option> <option value="blackburn_rovers.png">Blackburn Rovers</option> <option value="bolton_wanderers.png">Bolton Wanderers</option> <option value="burnley.png">Burnley</option> <option value="chelsea.png">Chelsea</option> <option value="everton.png">Everton</option> <option value="fulham.png">Fulham</option> <option value="hull.png">Hull City</option> <option value="liverpool.png">Liverpool</option> <option value="manchester_city.png">Manchester City</option> <option value="manchester_united.png">Manchester United</option> <option value="portsmouth.png">Portsmouth</option> <option value="stoke_city.png">Stoke City</option> <option value="sunderland.png">Sunderland</option> <option value="tottenham_hotspur.png">Tottenham Hotspur</option> <option value="west_ham.png">West Ham</option> <option value="wigan_athletic.png">Wigan Athletic</option> <option value="wolverhampton_wanderers.png">Wolverhampton Wanderers</option> </select> </form> Code: function changeDivImage(url) { document.getElementById("third_col").style.backgroundImage = "url('images/" + url + "')"; } thank you in advance Hello all, So I am doing site management, and I have a problem with a redirection that is going on. There is a directory in the root called venngo (http://url/vengngo/) however it redirects to a different page all together, so I removed the folder, uploaded a new one, and it still redirects. I have checked my cache and multiple machines, so I know it is not on my side. The only time my page works is if I physically add /index.php tot eh directory to make it (http://url/vengngo/index.php) What should I be looking for in the files for the website for a possible redirection script. Maybe htaccess? hi, i need some help with this. the following line is in a script <META http-equiv='refresh' content='1; URL=http://lblah.com/radio.php?ipp=84.95.247.20&port=22930&ch=898'> now this script redirects to another page.. is there some way i can get it to do this without actually leaving the page im on. thanks in advance for your help Is there any HTML code to redirect mistyped urls? Let's say someone wanted to get to a music section of my site. They type in XXX.com/music instead of XXX.com/music.html. Any way to get this done? Hi I want to know what main difference is between 301 redirect and 302 redirect. I redirected my site permanently (301) to another site and I lost all my original hyperlinks on the old webpage. If I want to keep all previous links alive, what should I do? Thanks! Hello I'm redirecting pages using 301 redirect in my htaccess file, like redirect 301 "/servicesxxx.php" http://www.site.com/services.php but I have a page like this: www.somename.site.ca/indexpage.php I tried putting the whole thign in there but it doesn't work. How can I successfully redirect that page? I have a link going direct to pdf documents on one site eg www.one.com/blah.pdf. The pdf's are moving to a new web site www.two.com/blah.pdf. How do I redirect people that link direct to the old pdf to the new one. These pdfs are coming up very high in Google. I was hoping if I changed them to redirects Google would follow. Also for those that have a link in their web site to these pdfs it will be broken when I move them to the new url. I went to a site for optimization & on review it told me my site had a re-direct, which was bad. Its been awhile since I tinkered with my site, so beats me where I put it. Can anyone help find out where it is? Newbie to this forum. Thanks. website is: kallico.net Thanks for any help on this, or anything else to help it get noticed more. hi how do u use a redirect 301 code in html file in a website ? and wat is the use of that ? |