Pligg Welcome Page Redirect

Today a guest in the IRC chatroom for Pligg ( #pligg) ask if there was a way to create a landing page on his website to welcome first time visitors. Being the gracious coder that I am, I gave him a simple example that can be used to redirect newcomers to a welcome page. Add the code below to the top of your pligg.tpl template file to redirect users to a URL of your choosing (see code comments). I suggest creating a static HTML page with a welcome message or registration form.

{if $pagename eq 'index'}
			setcookie("PliggWelcome", "visited");
			// Change this line to point to your welcome page...
			echo '<meta http-equiv="REFRESH" content="0;url=">';
			// echo "No cookie was found.. Continue loading page"; 

Having trouble reading or copying the text above? Try this url.

This snippet of code works by checking if the person browsing the page has a specific cookie installed on their browser. If the cookie does not exist, it will add it and then redirect the user to another page. If the user does have the cookie, then the page will continue loading like normal. I haven’t personally tested this out on a Pligg myself, so let me know if you have any problems or comments.

Share this post

2 thoughts on “Pligg Welcome Page Redirect

  1. Do you know any of module or something,where we can ask for newsletter subscription… I checked alot but couldnot found

Comments are closed.