Post Reply 
Integrating with dynamic links (Outdated)
10-Aug-2010, 06:52 PM
Post: #2
RE: Integrating with dynamic links.
Ah, yes, there is one thing I forgot to mention. If you don't want someone to see an "invalid id" error if they decide to enter something in the url, then add a check against it.
PHP Code:
switch($_GET['layout'])
{
    case 
'article1': case 'article2': case 'article3'/*etc...*/
    
define('VALID_COMMENT_PAGE','true');
    break;
//only one break required


Then shove the include script into an if statement:
PHP Code:
if(defined('VALID_COMMENT_PAGE'))
{
    
$page_id $_GET['value']; 
    
$path_to_comments_folder "comments/"
    
define ('IN_COMMENTICS''true'); //no need to edit this line 
    
require $path_to_comments_folder "includes/commentics.php"//no need to edit this line 


One advantage of this is that you can add an optional else statement to show something else when a comment system isn't supposed to be there. Enjoy!

I'm giving you three guesses...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Integrating with dynamic links. - Static - 10-Aug-2010 06:52 PM
RE: Integrating with dynamic links. - NexTu - 22-Mar-2011, 08:45 PM
RE: Integrating with dynamic links. - NexTu - 22-Mar-2011, 10:14 PM
RE: Integrating with dynamic links. - NexTu - 23-Mar-2011, 08:09 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)