Code: Select all
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" alt="{L_POST_REPLY_TOPIC}" /></a>
Code: Select all
{CA_QUICK_REPLY_BUTTON}
I have done a little MOD for this, but nothing on my screen ! An error ?Is it possible to view in a forum, each topic where a 'thank' had be done with a small gif (hart.gif) : the viewforum_body.tpl (and viewforum.php also ?) must be changed, but how this ?
Code: Select all
## Files To Edit: 7
## search.php
## viewforum.php
## includes/functions.php
## language/lang_french/lang_main.php
## templates/subSilver/search_results_topics.tpl
## templates/subSilver/subSilver.cfg
## templates/subSilver/viewforum_body.tpl
## Included Files: 1
## templates/subSilver/images/thanksvf.gif
##
##############################################################
#-----[ OPEN ]------------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------------
#
$topic_type = $searchset[$i]['topic_type'];
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//Thanks Viewforum by pottepei
if ($userdata['session_logged_in'])
{
$folder_thanks_viewforum = topics_thanks_viewforum($searchset[$i]['topic_id']);
}
//Thanks Viewforum by pottepei
#
#-----[ FIND ]------------------------------------------------
#
'LAST_POST_IMG' => $last_post_url,
#
#-----[ AFTER, ADD ]-----------------------------------------
#
//Thanks Viewforum by pottepei
'TOPIC_THANKS_VIEWFORUM' => $folder_thanks_viewforum,
//Thanks Viewforum by pottepei
#
#-----[ OPEN ]------------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------------
#
'FOLDER_IMG' => $images['folder'],
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//Thanks Viewforum
'FOLDER_IMG_THANKSVF' => $images['folder_thanks_viewforum'],
'L_THANKSVF_POST' => $lang['thanks_viewforum'],
//Thanks Viewforum
#
#-----[ FIND ]------------------------------------------------
#
$replies = $topic_rowset[$i]['topic_replies'];
$topic_type = $topic_rowset[$i]['topic_type'];
#
#-----[ AFTER, ADD ]-----------------------------------------
#
//Thanks Viewforum by pottepei
if ($userdata['session_logged_in'])
{
$folder_thanks_viewforum = topics_thanks_viewforum($topic_id);
}
//Thanks Viewforum by pottepei
#
#-----[ FIND ]------------------------------------------------
#
'TOPIC_FOLDER_IMG' => $folder_image,
#
#-----[ AFTER, ADD ]-----------------------------------------
#
//Thanks Viewforum
'TOPIC_THANKS_VIEWFORUM' => $folder_thanks_viewforum,
//Thanks Viewforum
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//Thanks Viewforum by pottepei
function topics_thanks_viewforum($topic_id)
{
global $db, $images, $lang;
$sql = "SELECT topic_id FROM " . THANKS_TABLE . " WHERE topic_id > 0";
if ( $db->sql_fetchrow($result) )
{
$folder_thanks_viewforum = '<img src="' . $images['folder_thanks_viewforum'] . '" alt="' . $lang['thanks_viewforum'] . '" title="' . $lang['thanks_viewforum'] . '" border="0" />';
}
else
{
$folder_thanks_viewforum = '';
}
return $folder_thanks_viewforum;
}
//Thanks Viewforum by pottepei
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_french/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ AFTER, ADD ]-----------------------------------------
#
//Thanks Viewforum
$lang['thanks_viewforum'] = 'This topic has recieved many thanks';
//Thanks Viewforum
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/search_results_topics.tpl
#
#-----[ FIND ]-----------------------------------------
#
<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a>
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
{searchresults.FOLDER_IMG_THANKSVF}
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------------
#
$images['folder_new'] = "$current_template_images/folder_new.gif";
#
#-----[ AFTER, ADD ]-----------------------------------------
#
$images['folder_thanks_viewforum'] = "$current_template_images/thanksvf.gif";
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
#
#-----[ IN LINE AFTER, ADD ]-----------------------------------------
#
{topicrow.FOLDER_IMG_THANKSVF}
#
#-----[ FIND ]------------------------------------------------
#
<tr>
<td class="gensmall"><img src="{FOLDER_LOCKED_NEW_IMG}" alt="{L_NEW_POSTS_LOCKED}" width="19" height="18" /></td>
<td class="gensmall">{L_NEW_POSTS_LOCKED}</td>
<td> </td>
<td class="gensmall"><img src="{FOLDER_LOCKED_IMG}" alt="{L_NO_NEW_POSTS_LOCKED}" width="19" height="18" /></td>
<td class="gensmall">{L_NO_NEW_POSTS_LOCKED}</td>
</tr>
#
#-----[ AFTER, ADD ]-----------------------------------------
#
<!-- BEGIN switch_user_logged_in -->
<tr>
<td class="gensmall"><img src="{FOLDER_IMG_THANKSVF}" alt="{L_THANKSVF_POST}" width="15" height="10" /></td>
<td class="gensmall">{L_THANKSVF_POST}</td>
<td> </td>
</tr>
<!-- END switch_user_logged_in -->
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
Thanks, but is it the script good (correct) ?Pottei I'm not sure of the problem there
Code: Select all
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql .), " . intval($HTTP_POST_VARS['forumthank']) . "
Try to replace it with this:madman71 wrote:Im installing the Thank you mod and Im getting this error here:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/e/r/a/erasure/html/forum/phpBB2/admin/admin_forums.php on line 409
This happens in the ACP. Im assuming that line 409 is just malformed.
Here's the code that i have:
the following is LINE 409I think the error is in that last line there.Code: Select all
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql .), " . intval($HTTP_POST_VARS['forumthank']) . "
can anyone point out this error plz ?
Code: Select all
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['forumthank']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";