Author Topic: Rate / Comments for custum Pages !!  (Read 2838 times)

0 Members and 1 Guest are viewing this topic.

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Rate / Comments for custum Pages !!
« on: October 27, 2005, 09:49:51 PM »
i want know how can i made a comments/rate works in other pages , i've create more pages using php/html for example :

Code: [Select]
<?php 
$main_template 
'article_1'

define('GET_CACHES'1); 
define('ROOT_PATH''./'); 
define('GET_USER_ONLINE'1); 
include(
ROOT_PATH.'global.php'); 
require(
ROOT_PATH.'includes/sessions.php');
include(
ROOT_PATH.'encuestas.php');
include(
ROOT_PATH.'includes/stats.php'); 
$user_access get_permission(); 

if (isset(
$HTTP_GET_VARS['template']) || isset($HTTP_POST_VARS['template'])) { 
  
$template = (isset($HTTP_GET_VARS['template'])) ? stripslashes(trim($HTTP_GET_VARS['template'])) : stripslashes(trim($HTTP_POST_VARS['template'])); 
  if (!
file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) { 
    
$template ""
  } 
  else { 
    
$main_template $template
  } 

else { 
  
$template ""

include(
ROOT_PATH.'includes/page_header.php'); 

if (!empty(
$template)) { 
  
$clickstream "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_"" "ucfirst($template)); 
  
$site_template->register_vars("clickstream"$clickstream); 
  
$site_template->print_template($site_template->parse_template($main_template)); 
  include(
ROOT_PATH.'includes/page_footer.php'); 


$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator']; 
$clickstream .= $main_template


//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"msg" => $msg
  
"clickstream" => $clickstream 
)); 
  
  
$site_template->print_template($site_template->parse_template($main_template)); 
  include(
ROOT_PATH.'includes/page_footer.php'); 

?>

Html page (article_1.html) , so it's possible added at this pages a comments/rate ?

What i need to do ? copy some code from details.php ? make new DB tables ??

 8O

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Rate / Comments for custum Pages !!
« Reply #1 on: October 28, 2005, 12:25:25 AM »
Since your "custom" pages is something different from images and comments in 4images are only work with images table, you will need code completly independed from build-in comment/rating system...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)