forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: Comments => Topic started by: Makc666 on February 20, 2007, 10:22:07 am
-
For this board:
http://forum.coppermine-gallery.net/index.php?board=76.0
I think this one can be/must be included in 1.4.11 ;)
########################################################
## MOD Title: Link to Author's Profile Page in Comments
## MOD Author: Makc666 < makc666@yahoo.com > (Maxim) http://makc666.tripod.com
## MOD Description: Replace author's name in comments with author's name as a link to author's profile page.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 3 Minutes
##
## Files To Edit: 1
## include/themes.inc.php
##
## Included Files: 0
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
#################################################################
## For security purposes, please check: http://forum.coppermine-gallery.net/index.php?board=84.0
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://forum.coppermine-gallery.net/index.php?board=84.0
##############################################################
## Author Notes:
## Tested on 1.4.10
##
##############################################################
## MOD History:
##
## 2007-02-20 - Version 1.0.0
## - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
include/themes.inc.php
#
#-----[ FIND ]------------------------------------------
#
<td class="tableh2_compact" nowrap="nowrap">
<b>{MSG_AUTHOR}</b><a name="comment{MSG_ID}"></a>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td class="tableh2_compact" nowrap="nowrap">
<a href ="profile.php?uid={MSG_AUTHOR_ID}"><b>{MSG_AUTHOR}</b></a><a name="comment{MSG_ID}"></a>
#
#-----[ FIND ]------------------------------------------
#
$params = array('{MSG_AUTHOR}' => stripslashes($row['msg_author']),
'{MSG_ID}' => $row['msg_id'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'{MSG_AUTHOR_ID}' => $row['author_id'],
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
-
How does this handle anonymous comments?
include/themes.inc.php should not be modified, instead modify your theme's theme.php
-
Thanks! Very easy install.
-
How does this handle anonymous comments?
include/themes.inc.php should not be modified, instead modify your theme's theme.php
// HTML template for the display of comments
if (!isset($template_image_comments)) { //{THEMES}
$template_image_comments = '
<table align="center" width="{WIDTH}" cellspacing="1" cellpadding="0" class="maintable">
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>';
if (MSG_AUTHOR_ID==0) {
$template_image_comments .= '
<td class="tableh2_compact" nowrap="nowrap">
<b>{MSG_AUTHOR}</b><a name="comment{MSG_ID}"></a> ';
} else {
$template_image_comments .= '
<td class="tableh2_compact" nowrap="nowrap">
<a href ="profile.php?uid={MSG_AUTHOR_ID}"><b>{MSG_AUTHOR}</b></a><a name="comment{MSG_ID}"></a> ';
}
}
$template_image_comments .= <<<EOT
<!-- BEGIN ipinfo -->
...
It does not work, where my mistake?
-
How does this handle anonymous comments?
If it is Anonymous user then the link direct you to User's Profile with ID = 0.
Like this one:
http://coppermine-gallery.net/demo/cpg14x/profile.php?uid=0
include/themes.inc.php should not be modified, instead modify your theme's theme.php
But if I want this one to be included in all themes? ;)
Than I think I can modify include/themes.inc.php
Hope to see in 1.4.11 as default.
-
cpg1.4.11 will be a maintenance release and therefor will definitely not contain new features. New features can possibly only go into new versions, which would be cpg1.5.x
-
That's part of the modpack since the beginning. Anon commenters aren't clickable (of course, cause the do not have a profile). Maybe you want to copy that functionality.
-
Feature already implemented in the devel branch ;)
-
bro i really like this
-
This is exactly what I needed. Although I think this should be available in every template, I copied theme_html_comments function from the sample theme and modified it. I use it on a bridged cpg 1.4.19 and it works perfect!