
Here a modification in order to modernize to your IP version 1.2.x.
Is a enough large UPDATE of the MOD Linkback.
Naturally fairies the backup of the rows before modifying
We begin:
OPEN
SEARCH:
$topic_url_enc = urlencode(utf8_decode(create_server_url() . VIEWTOPIC_MG . '?' . $forum_id_append . '&' . $topic_id_append . ($kb_mode ? ('&' . $kb_mode_append) : '')));
AFTER ADD:
// START Linkback on viewtopic.php || By J.C. Design ||
if ( ($board_config['url_rw'] == '1') || ( ($board_config['url_rw_guests'] == '1') && ($userdata['user_id'] == ANONYMOUS) ) )
{
$linkback = $topic_title . '-vt' . $topic_id;
$con_accento = array("à","è","é","ì","ò","ù");
$senza_accento = array("a","e","e","i","o","u");
$linkback = str_replace($con_accento,$senza_accento,$linkback);
$linkback = html_entity_decode($linkback);
$linkback = str_replace("'","'",$linkback);
$linkback = preg_replace("#[^a-zA-Z0-9-_ ]#","",$linkback);
$linkback = str_replace(" ","-",$linkback);
$linkback = str_replace("___","-",$linkback);
$linkback = str_replace("__","-",$linkback);
$linkback = str_replace("--","-",$linkback);
$linkback = str_replace("_-_","-",$linkback);
$linkback = str_replace("", "-", $linkback);
$linkback = strtolower($linkback).'.html';
}
else
{
$linkback = append_sid(VIEWTOPIC_MG . '?' . $topic_id_append . '');
}
// END Linkback on viewtopic.php || By J.C. Design ||
if ( ($board_config['url_rw'] == '1') || ( ($board_config['url_rw_guests'] == '1') && ($userdata['user_id'] == ANONYMOUS) ) )
{
$linkback = $topic_title . '-vt' . $topic_id;
$con_accento = array("à","è","é","ì","ò","ù");
$senza_accento = array("a","e","e","i","o","u");
$linkback = str_replace($con_accento,$senza_accento,$linkback);
$linkback = html_entity_decode($linkback);
$linkback = str_replace("'","'",$linkback);
$linkback = preg_replace("#[^a-zA-Z0-9-_ ]#","",$linkback);
$linkback = str_replace(" ","-",$linkback);
$linkback = str_replace("___","-",$linkback);
$linkback = str_replace("__","-",$linkback);
$linkback = str_replace("--","-",$linkback);
$linkback = str_replace("_-_","-",$linkback);
$linkback = str_replace("", "-", $linkback);
$linkback = strtolower($linkback).'.html';
}
else
{
$linkback = append_sid(VIEWTOPIC_MG . '?' . $topic_id_append . '');
}
// END Linkback on viewtopic.php || By J.C. Design ||
SEARCH:
'PAGE_NUMBER' => sprintf($lang['Page_of'], (floor($start / intval($board_config['posts_per_page']) ) + 1), ceil($total_replies / intval($board_config['posts_per_page']))),
AFTER ADD:
// START Linkback on viewtopic.php || By J.C. Design ||
'U_LINKBACK_URL' => 'http://' . $board_config['server_name'] . $board_config['script_path'] . $linkback,
'U_LINKBACK_BBCODE' => '[url=http://' . $board_config['server_name'] . $board_config['script_path'] . $linkback . ']' . $topic_title . ' - ' . $board_config['sitename'] . '[/url]',
'U_LINKBACK_HTML' => '<a href="http://' . $board_config['server_name'] . $board_config['script_path'] . $linkback . '">' . $topic_title . ' - ' . $board_config['sitename'] . '</a>',
'L_SELECT_LINKBACK_URL' => $lang['Select_Linkback_Url'],
'L_SELECT_LINKBACK_BBCODE' => $lang['Select_Linkback_Bbcode'],
'L_SELECT_LINKBACK_HTML' => $lang['Select_Linkback_Html'],
// END Linkback on viewtopic.php || By J.C. Design ||
'U_LINKBACK_URL' => 'http://' . $board_config['server_name'] . $board_config['script_path'] . $linkback,
'U_LINKBACK_BBCODE' => '[url=http://' . $board_config['server_name'] . $board_config['script_path'] . $linkback . ']' . $topic_title . ' - ' . $board_config['sitename'] . '[/url]',
'U_LINKBACK_HTML' => '<a href="http://' . $board_config['server_name'] . $board_config['script_path'] . $linkback . '">' . $topic_title . ' - ' . $board_config['sitename'] . '</a>',
'L_SELECT_LINKBACK_URL' => $lang['Select_Linkback_Url'],
'L_SELECT_LINKBACK_BBCODE' => $lang['Select_Linkback_Bbcode'],
'L_SELECT_LINKBACK_HTML' => $lang['Select_Linkback_Html'],
// END Linkback on viewtopic.php || By J.C. Design ||
OPEN /languge/lang_english/lang_main.php
SEARCH:
BEFORE ADD:
//Linkback || By J.C. Design
$lang['Select_Linkback_Url'] = 'Click in order to select the link direct.';
$lang['Select_Linkback_Bbcode'] = 'Click in order to select the BBCode code to use in the forums.';
$lang['Select_Linkback_Html'] = 'Click in order to select the link HTML code to use in the sites or blog.';
$lang['Select_Linkback_Url'] = 'Click in order to select the link direct.';
$lang['Select_Linkback_Bbcode'] = 'Click in order to select the BBCode code to use in the forums.';
$lang['Select_Linkback_Html'] = 'Click in order to select the link HTML code to use in the sites or blog.';
OPEN templates/*/viewtopic_body.tpl
SEARCH:
<span class="genmed">{L_DISPLAY_POSTS}:</span> {S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} <input type="submit" value="{L_GO}" class="liteoption jumpbox" name="submit" />
</form>
</td>
</tr>
</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}
</form>
</td>
</tr>
</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}
AFETR ADD:
{IMG_THL}{IMG_THC}<span class="forumlink">{L_SHARE_TOPIC}</span>{IMG_THR}<table class="forumlinenb" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<form name="select_all">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="row1" width="120"><label for="linkback_url" class="post-details" style="cursor:pointer;" title="{L_SELECT_LINKBACK_URL}"><b>URL:</b></label></td>
<td class="row2"><textarea id="linkback_url" style="width:99%;height:15px;" readonly="readonly" onClick="javascript:this.form.linkback_url.focus();this.form.linkback_url.select();" class="gensmall">{U_LINKBACK_URL}</textarea>
</td>
</tr>
<tr>
<td class="row1" width="120"><label for="linkback_html" class="post-details" style="cursor:pointer;" title="{L_SELECT_LINKBACK_HTML}"><b>HTML:</b></label></td>
<td class="row2"><textarea id="linkback_html" style="width:99%;height:15px;" readonly="readonly" onClick="javascript:this.form.linkback_html.focus();this.form.linkback_html.select();" class="gensmall">{U_LINKBACK_HTML}</textarea>
</td>
</tr>
<tr>
<td class="row1" width="120"><label for="linkback_bbcode" class="post-details" style="cursor:pointer;" title="{L_SELECT_LINKBACK_BBCODE}"><b>BBCode:</b></label></td>
<td class="row2"><textarea id="linkback_bbcode" style="width:99%;height:15px;" readonly="readonly" onClick="javascript:this.form.linkback_bbcode.focus();this.form.linkback_bbcode.select();" class="gensmall">{U_LINKBACK_BBCODE}</textarea>
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td class="spaceRow" colspan="5"><img src="{SPACER}" width="1" height="3" alt=""></td>
</tr>
</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}
<tr>
<td>
<form name="select_all">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="row1" width="120"><label for="linkback_url" class="post-details" style="cursor:pointer;" title="{L_SELECT_LINKBACK_URL}"><b>URL:</b></label></td>
<td class="row2"><textarea id="linkback_url" style="width:99%;height:15px;" readonly="readonly" onClick="javascript:this.form.linkback_url.focus();this.form.linkback_url.select();" class="gensmall">{U_LINKBACK_URL}</textarea>
</td>
</tr>
<tr>
<td class="row1" width="120"><label for="linkback_html" class="post-details" style="cursor:pointer;" title="{L_SELECT_LINKBACK_HTML}"><b>HTML:</b></label></td>
<td class="row2"><textarea id="linkback_html" style="width:99%;height:15px;" readonly="readonly" onClick="javascript:this.form.linkback_html.focus();this.form.linkback_html.select();" class="gensmall">{U_LINKBACK_HTML}</textarea>
</td>
</tr>
<tr>
<td class="row1" width="120"><label for="linkback_bbcode" class="post-details" style="cursor:pointer;" title="{L_SELECT_LINKBACK_BBCODE}"><b>BBCode:</b></label></td>
<td class="row2"><textarea id="linkback_bbcode" style="width:99%;height:15px;" readonly="readonly" onClick="javascript:this.form.linkback_bbcode.focus();this.form.linkback_bbcode.select();" class="gensmall">{U_LINKBACK_BBCODE}</textarea>
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td class="spaceRow" colspan="5"><img src="{SPACER}" width="1" height="3" alt=""></td>
</tr>
</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}
EoM
I hope you or useful
