MOD Linkback For Viewtopic »  Show posts from    to     

Icy Phoenix


Old Customizations - MOD Linkback For Viewtopic



FedericoBiccheddu [ Sun 21 Dec, 2008 21:36 ]
Post subject: MOD Linkback For Viewtopic
I make excuses myself anticipatamente in order to have open an other argument but it is to various 90% from the old MOD

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
Code: [Hide] [Select]
viewtopic.php


SEARCH:
Code: [Hide] [Select]
$topic_url_enc = urlencode(utf8_decode(create_server_url() . VIEWTOPIC_MG . '?' . $forum_id_append . '&' . $topic_id_append . ($kb_mode ? ('&' . $kb_mode_append) : '')));


AFTER ADD:
Code: [Hide] [Select]
// 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 ||



SEARCH:
Code: [Hide] [Select]
'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:
Code: [Hide] [Select]
// 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 ||


OPEN /languge/lang_english/lang_main.php

SEARCH:
Code: [Hide] [Select]
//$lang[''] = '';


BEFORE ADD:

Code: [Hide] [Select]
//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.';



OPEN templates/*/viewtopic_body.tpl

SEARCH:
Code: [Hide] [Select]
<span class="genmed">{L_DISPLAY_POSTS}:</span>&nbsp;{S_SELECT_POST_DAYS}&nbsp;{S_SELECT_POST_ORDER}&nbsp;<input type="submit" value="{L_GO}" class="liteoption jumpbox" name="submit" />
</form>
</td>
</tr>
</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}


AFETR ADD:
Code: [Hide] [Select]
{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}


EoM


I hope you or useful


abels_182 [ Sun 18 Jan, 2009 19:52 ]
Post subject: Re: MOD Linkback For Viewtopic
Great!
This increases the positioning on Google?


Chaotic [ Sun 18 Jan, 2009 21:38 ]
Post subject: Re: MOD Linkback For Viewtopic
I don't think it helps page rank, but it makes it easier for your members to post links to specific topics from your board, elsewhere.


FedericoBiccheddu [ Wed 21 Jan, 2009 19:56 ]
Post subject: Re: MOD Linkback For Viewtopic
They are not a SEO expert, but creed because link they are not directed but does not come only interpreted like text


Ita:
Non sono un esperto di SEO, ma non credo perchè non sono link diretti ma viene interpretato solo come testo.


abels_182 [ Wed 21 Jan, 2009 20:09 ]
Post subject: Re: MOD Linkback For Viewtopic
Ok, thanks!


Chaotic [ Wed 21 Jan, 2009 23:26 ]
Post subject: Re: MOD Linkback For Viewtopic
JC Design wrote: [View Post]
They are not a SEO expert, but creed because link they are not directed but does not come only interpreted like text


Ita:
Non sono un esperto di SEO, ma non credo perchè non sono link diretti ma viene interpretato solo come testo.


No offense buddy, but I have no idea what you just said.

abels_182 wrote: [View Post]
Ok, thanks!


Or maybe it's just me...


FedericoBiccheddu [ Wed 21 Jan, 2009 23:47 ]
Post subject: Re: MOD Linkback For Viewtopic
I'm not expert about SEO, but I don't think because they're not direct link, but it is considered only as a text.


It goes well now?


Chaotic [ Wed 21 Jan, 2009 23:50 ]
Post subject: Re: MOD Linkback For Viewtopic
Much better.

Thanks!


Structor [ Sat 28 Mar, 2009 16:45 ]
Post subject: Re: MOD Linkback For Viewtopic
I made this modifications, but I get this error:

Spoiler: [ Show ]


line 1494 is this:

Spoiler: [ Show ]


FedericoBiccheddu [ Sat 28 Mar, 2009 22:14 ]
Post subject: Re: MOD Linkback For Viewtopic
Me it seems strange, because nobody has never had this problem! It is not that you have forgotten a comma after the value in the Array?



Mi sembra strano, perchè nessuno ha mai avuto questo problema!

Non è che hai dimenticato una virgola, dopo il value nell'array?


Structor [ Sat 28 Mar, 2009 22:48 ]
Post subject: Re: MOD Linkback For Viewtopic
It is strage indeed, because that line was never modified, it is exactly the same like the one from original package. I verified that several times, I will verify it again.

E 'Strage di fatto, perché la linea non è mai stata modificata, è esattamente lo stesso come quello da imballaggio. Ho verificato che più volte, mi verificare nuovamente.


... I verified again, it is like I said.
... Ho verificato ancora una volta, è come ho detto.


I noticed that the error apear when I paste the first part of code
Ho notato che l'errore visualizzati quando si incolla la prima parte del codice

Spoiler: [ Show ]


To see what's happening, I inserted only the second part, and the error doesn't apear, but the links are not completed. The correct link from that viewtopic I tested is: http://doizecisti.ro/viewtopic.php?f=4&p=26827#p26827

Per vedere cosa succede, ho inserito solo la seconda parte, e l'errore non visualizzati, ma il link non sono completati.
Il corretto collegamento da quello viewtopic che ho provato è : http://doizecisti.ro/viewtopic.php?f=4&p=26827#p26827



Edit2: The error does not apear when I skip this line from your code:
Edit2: L'errore non visualizzati quando ho saltare questa linea di codice:
Spoiler: [ Show ]

But the link are still incomplete, like in the image I attached
Ma i legami sono ancora incompleti, come nella immagine che ho allegato


FedericoBiccheddu [ Fri 03 Apr, 2009 23:12 ]
Post subject: Re: MOD Linkback For Viewtopic
You are sure to have created also the variable ones of the template ones? The following ones:
Code: [Hide] [Select]
// 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 ||




Structor [ Sat 04 Apr, 2009 00:11 ]
Post subject: Re: MOD Linkback For Viewtopic
100% positive

Anyway, have made another try, and ... surprise: it worked ;))

But without this line:

Spoiler: [ Show ]


Thank you!




Powered by Icy Phoenix