SEO Urls V2

In diesem Forum können Mod-Autoren ihre Mods vorstellen, die sich noch im Entwicklungsstatus befinden. Der Einbau in Foren im produktiven Betrieb wird nicht empfohlen.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Maddin007
Mitglied
Beiträge: 22
Registriert: 04.10.2007 23:51
Wohnort: Gründau
Kontaktdaten:

Beitrag von Maddin007 »

Wie lange brauchst du noch dafür??
Parse Error
Mitglied
Beiträge: 272
Registriert: 27.12.2006 20:44
Kontaktdaten:

Beitrag von Parse Error »

Sehr freundlich. Um Dich zu beruhigen: Er hat noch gar nicht angefangen, weil er auf das Gold Release von Olympus wartet.

Und damit hat er meines Erachtens auch nicht unrecht, insbesondere wenn man Aussagen wie die folgende bedenkt:
Acyd Burn hat geschrieben:And RC6 will see a lot of (necessary) changes which will most likely break a lot of Mods.
Unter diesen Voraussetzungen kann man es keinem MOD-Autor vorwerfen, wenn er einfach abwartet und Tee trinkt.

P.E.
Nicht nur für Kletterer: Deutsches Slackline Forum
derzaenker
Mitglied
Beiträge: 17
Registriert: 31.01.2006 17:37
Wohnort: Potsdam
Kontaktdaten:

no_recent.php

Beitrag von derzaenker »

Hallo, nachdem ich mich mal hier durch den berg an beiträgen gewurschtelt habe bin ich leider nicht fündig geworden.

Folgendes Problem:

Ich nutze zum anzeigen der letzten Forenbeiträge die "no_recent.php" siehe hier Txt File der no_recent

Jetzt hatte ich auf die V2 URLs umgestellt funktioniert auch bestens mit der normalen recent.php im Forum Root, aber wenn ich die letzten Beiträge auf einer anderen nicht im ordner /Forum/ liegenden Ebene anzeigen will, werden zwar die Werte ausgegeben aber die URL´s stimmen nicht.

bsp: richtig währe =
fussball-test-t6798.html
ausgegeben wird allerdings
ftopic6798.html

Nun hatte ich folgenden Beitrag gefunden, aber an der Umsetzung wo den nun was hin soll scheiterte es tagelang:

Beitrag

Daher meine Frage kann mir hier jemand weiterhelfen?!

Thanks im vorraus schon mal......
Parse Error
Mitglied
Beiträge: 272
Registriert: 27.12.2006 20:44
Kontaktdaten:

Beitrag von Parse Error »

Grüß Euch,

erinnert sich noch jemand an das manica-Problem?

(Siehe dazu http://www.phpbb.de/viewtopic.php?p=742957#742957 und die Folgeseiten.)

Ich hatte das Problem jetzt auch, dass z.B. aus dem Forum 1 mit dem Titel "schöne Welt" nicht schoene-welt-f1.html sondern schne-welt-f1.html wurde. Die Umlaute wurden also nicht umgewandelt sondern einfach weggekürzt.

Benutzt habe ich zum Editieren des Codes gEdit und Quanta Plus (beides Linux Editoren).

Des Rätsels Lösung: Die session.php ist in UTF-8 abgespeichert, mgutts Anleitung aber in ISO 8859-15.

Wenn man die session.php nach dem Austausch der function_append_sid in 8859-15 speichert, klappt alles. (Bleibt die session.php hingegen UTF-8-codiert, tritt das manica-Problem auf.)

P.E.
Nicht nur für Kletterer: Deutsches Slackline Forum
AVAST
Mitglied
Beiträge: 3
Registriert: 15.11.2007 19:38

Re: SEO Urls V2

Beitrag von AVAST »

mgutt hat geschrieben:Ich beginne hier eine neue Variante der SEO Urls oder auch Short Urls genannt.

Die Titel der Beiträge und Foren werden mit in der Url dargestellt und das ohne jegliche Datenbankabfragen. (=schnell)

Der Mod setzt "mod_rewrite" voraus. Ob dies aktiv ist könnt ihr wie hier testen:
http://www.phpbb.de/viewtopic.php?p=681388#681388

History:
- seit der Version 1.0.5 wurde nur die "function append_sid..." aus der sessions.php verändert, einfach komplett ersetzen.

Ein Demo-Board gibts hier: www.evop.de

Download


Add Ons (können installiert werden, müssen aber nicht)

- Doppelten Content vermeiden:
Viele Seiten in eurem Forum sind über verschiedene Adressen erreichbar. Eine Themenseite beispielsweise kann man mit ca. 20 verschiedenen URLs erreichen. Solche Verdopplung Eurer Seiten, sieht die Suchmaschine ungern und wertet es im schlimmsten Fall sogar als Spam.

Die Double Content Addons befinden sich im Downloadpack unter "addons/avoid_double_content.txt".

- Alte Short Urls in neue Seo Urls wandeln (z.B. wenn ihr die Short Urls von larsneo installiert hattet)
Umwandeln könnt ihr mit der forward.php und den codehinweisen aus der betreffenden readme.txt.


Weitere benötigte Änderungen für Mods:

Anleitung zum selber anpassen von Mods
http://www.phpbb.de/viewtopic.php?p=728051#728051

recent.php:
http://www.phpbb.de/viewtopic.php?p=679208#679208

eine andere recent.php:
http://www.phpbb.de/viewtopic.php?p=685076#685076

Similar topic Mod:
http://www.phpbb.de/viewtopic.php?p=719705#719705

Report Post Mod:
http://www.phpbb.de/viewtopic.php?p=705847#705847
und
http://www.phpbb.de/viewtopic.php?p=704796#704796

Intro & Portal Mod (AWSW):
http://www.phpbb.de/viewtopic.php?p=721375#721375

Album Mod (Smartor)
http://www.phpbb.de/viewtopic.php?p=679083#679083

Pseudo Subforums
http://www.phpbb.de/viewtopic.php?p=727394#727394

Simple Subforums
http://www.phpbb.de/viewtopic.php?p=728163#728163


ahoj já mám problém tímto po instalování modu Gehe zu Seite 1, 2 eror HTTP 404

Previous - eror HTTP 404

zajimavosti-na-vase-bloky-a-weby-f68,start_letter.html

start_letter.html - eror HTTP 404 - Soubor nenalezen
Internet Explorer

Code: Alles auswählen

// Start Sort Topics Alphabetically MOD

// Begin Configuration Section
// Change this to whatever you want the divider to be. Be sure to keep both apostrophies.
$divider = ', ';
// End Configuration Section

// Do not change anything below this line.
$total_letters_count = count($letters_array);
$this_letter_number = 0;

$template->assign_vars(array(
	'L_SORT_ALPHABETICALLY' => $lang['Sort_alphabetically'],
	'L_ALL_TOPICS' => $lang['All_Topics'],
	'DIVIDER' => $divider,
	'U_ALL_TOPICS' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&start_letter=&topicdays=$topic_days"),
));

foreach ( $letters_array as $letter )
{
	$this_letter_number++;
	
	$template->assign_block_vars("alphabetical_sort", array(
		'LETTER' => $letter,
		'U_LETTER' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&start_letter=$letter&topicdays=$topic_days"),
		'DIVIDER' => ( $this_letter_number != $total_letters_count ) ? $divider : '',
	));
}
//End Sort Topics Alphabetically MOD 
:cry:
Benutzeravatar
baerenwurm
Mitglied
Beiträge: 285
Registriert: 06.11.2002 16:29
Kontaktdaten:

Beitrag von baerenwurm »

Hi.

Welche mit dieser MOD (und deren Addons) uneingeschränkt kompatible Subforums-MOD kann ich bedenkenlos installieren?

Ich musste vor einiger Zeit eine Subforums-MOD deinstallieren, da sie - glaube ich - nicht mit dem "Last Topic post on Index"-Addon kompatibel war.
AVAST
Mitglied
Beiträge: 3
Registriert: 15.11.2007 19:38

Beitrag von AVAST »

##############################################################
## MOD Title: Sort Topics Alphabetically
## MOD Author: pentapenguin < pentapenguin@bluebottle.com > (Jeremy Conley) http://www.pentapenguin.com
## MOD Description: This MOD allows you to sort topics alphabetically within a forum.
## MOD Version: 0.2.0
##
## Installation Level: Easy
## Installation Time: 10 Minutes
##
## Files To Edit: 3
## viewforum.php
## langauge/lang_english/lang_main.php
## templates/subSilver/viewforum_body.tpl
##
## Included Files: n/a
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## 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://www.phpbb.com/mods/
##############################################################
## Author Notes:
## Optional step: if you have CyberAlien's eXtreme Styles MOD (http://www.phpbb.com/phpBB/viewtopic.php?t=125251),
## you can copy the file in contrib/admin/xs_sort_topics_alphabetically.cfg to admin/xs_sort_topics_alphabetically.cfg and you will
## be automatically notified if there's an update available when you use the "check for updates" function.
##
## This MOD is EasyMOD friendly! (http://area51.phpbb.com/phpBB/viewforum.php?sid=&f=17)
##
## For additional language and style downloads, please visit http://www.pentapenguin.com/forum/viewtopic.php?t=206
##
## To update to 0.2.0, see update_sort_topics_alphabetically_from_0.1.0_to_0.2.0.txt
##############################################################
## MOD History:
## 2005-11-15 - Version 0.2.0
## - Fixed many bugs.
## - Enabled better customization for more letters or letters in other non Latin based alphabets.
##
## 2004-11-10 - Version 0.1.0
## - First Public Beta
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################


#
#-----[ OPEN ]------------------------------------------
#
viewforum.php


#
#-----[ FIND ]------------------------------------------
#
else
{
$mark_read = '';
}


#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start Sort Topics Alphabetically MOD
$letters_array = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
$start_letter = ( isset($HTTP_GET_VARS['start_letter']) ) ? htmlspecialchars($HTTP_GET_VARS['start_letter']) : '';
$start_letter = str_replace("\'", "''", $start_letter);

if ( !in_array($start_letter, $letters_array) )
{
$start_letter = '';
}
// End Sort Topics Alphabetically MOD


#
#-----[ FIND ]------------------------------------------
#
$topics_count = ( $forum_row['forum_topics'] ) ? $forum_row['forum_topics'] : 1;

$limit_topics_time = '';
$topic_days = 0;


#
#-----[ BEFORE, ADD ]------------------------------------------
#

// Start Sort Topics Alphabetically MOD
if ( $start_letter )
{
$sql = 'SELECT COUNT(topic_id) AS forum_topics
FROM ' . TOPICS_TABLE . "
WHERE forum_id = $forum_id
AND topic_title LIKE '$start_letter%'";

if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get topic counts for letter search', '', __LINE__, __FILE__, $sql);
}

$row = $db->sql_fetchrow($result);

$topics_count = ( $row['forum_topics'] ) ? $row['forum_topics'] : 1;

$db->sql_freeresult($result);
}

else
{
// End Sort Topics Alphabetically MOD


#
#-----[ AFTER, ADD ]------------------------------------------
#
# Note: add the following after the code in the FIND statement above.
#

// Start Sort Topics Alphabetically MOD
}
// End Sort Topics Alphabetically MOD


#
#-----[ FIND ]------------------------------------------
#
# Note: this is part of a large SQL query but this part is on its own line.
#
AND t.topic_type <> " . POST_ANNOUNCE . "


#
#-----[ AFTER, ADD ]------------------------------------------
#
AND t.topic_title LIKE '$start_letter%'


#
#-----[ FIND ]------------------------------------------
#
# Note: the full line to find on a fresh phpBB installation is: 'S_POST_DAYS_ACTION' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&start=$start"))
#
'S_POST_DAYS_ACTION' =>


#
#-----[ IN-LINE FIND ]------------------------------------------
#
start=$start


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
&start_letter=$start_letter


#
#-----[ FIND ]------------------------------------------
#
# Note: the full line to find on a fresh phpBB installation is: 'PAGINATION' => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
#
'PAGINATION' =>


#
#-----[ IN-LINE FIND ]------------------------------------------
#
$topic_days


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
&start_letter=$start_letter


#
#-----[ FIND ]------------------------------------------
#
$template->pparse('body');


#
#-----[ BEFORE, ADD ]------------------------------------------
#

// Start Sort Topics Alphabetically MOD

// Begin Configuration Section
// Change this to whatever you want the divider to be. Be sure to keep both apostrophies.
$divider = ', ';
// End Configuration Section

// Do not change anything below this line.
$total_letters_count = count($letters_array);
$this_letter_number = 0;

$template->assign_vars(array(
'L_SORT_ALPHABETICALLY' => $lang['Sort_alphabetically'],
'L_ALL_TOPICS' => $lang['All_Topics'],
'DIVIDER' => $divider,
'U_ALL_TOPICS' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&start_letter=&topicdays=$topic_days"),
));

foreach ( $letters_array as $letter )
{
$this_letter_number++;

$template->assign_block_vars("alphabetical_sort", array(
'LETTER' => $letter,
'U_LETTER' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&start_letter=$letter&topicdays=$topic_days"),
'DIVIDER' => ( $this_letter_number != $total_letters_count ) ? $divider : '',
));
}
//End Sort Topics Alphabetically MOD


#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php


#
#-----[ FIND ]------------------------------------------
#
# Note: the full line to find on a fresh phpBB installation is: $lang['Display_topics'] = 'Display topics from previous';
#
$lang['Display_topics']


#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start Sort Topics Alphabetically MOD
$lang['Sort_alphabetically'] = 'Sort topics alphabetically';
// End Sort Topics Alphabetically MOD


#
#-----[ FIND ]------------------------------------------
#
# Note: the full line to find on a fresh phpBB installation is: $lang['No_topics_post_one'] = 'There are no posts in this forum.<br />Click on the <b>Post New Topic</b> link on this page to post one.';
#
$lang['No_topics_post_one']


#
#-----[ REPLACE WITH ]------------------------------------------
#
// Variable changed by the Sort Topics Alphabetically MOD
$lang['No_topics_post_one'] = 'Either there are no posts in this forum, or there are no matches for the letter you selected.<br />Click on the <b>Post New Topic</b> link on this page to start a new post or select another letter.';


#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewforum_body.tpl


#
#-----[ FIND ]------------------------------------------
#
<th align="center" class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
</tr>


#
#-----[ AFTER, ADD ]------------------------------------------
#

<tr>
<td class="catBottom" align="center" valign="middle" colspan="6" height="28">
<span class="genmed">{L_SORT_ALPHABETICALLY}: <a href="{U_ALL_TOPICS}" style="font-weight: bold;">{L_ALL_TOPICS}</a>{DIVIDER}
<!-- BEGIN alphabetical_sort -->
<a href="{alphabetical_sort.U_LETTER}" style="font-weight: bold;">{alphabetical_sort.LETTER}</a>{alphabetical_sort.DIVIDER}
<!-- END alphabetical_sort -->
</span>
</td>
</tr>


#
#-----[ FIND ]------------------------------------------
#
<input type="submit" class="liteoption" value="{L_GO}" name="submit" />
</span></td>
</tr>


#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="catBottom" align="center" valign="middle" colspan="6" height="28">
<span class="genmed">{L_SORT_ALPHABETICALLY}: <a href="{U_ALL_TOPICS}" style="font-weight: bold;">{L_ALL_TOPICS}</a>{DIVIDER}
<!-- BEGIN alphabetical_sort -->
<a href="{alphabetical_sort.U_LETTER}" style="font-weight: bold;">{alphabetical_sort.LETTER}</a>{alphabetical_sort.DIVIDER}
<!-- END alphabetical_sort -->
</span>
</td>
</tr>


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Benutzeravatar
mgutt
Mitglied
Beiträge: 2999
Registriert: 31.08.2004 16:44
Wohnort: Hennef
Kontaktdaten:

Beitrag von mgutt »

@ avast

Open includes/sessions.php

and edit like this:

Code: Alles auswählen

	// Disallow rewritting for:
	// - specific url parms (f.e. 'mode=confirm', )
	// - files (f.e. "memberlist.$phpEx", )
	// - folders (f.e. 'includes/', )
	//
	$seo_forbidden = array(
		'-',
		'login',
		'mode=confirm',
		'mark=topics',
		'view=',
		'start_letter',
	);
"'start_letter'," is the new line.
meine Foren: http://www.maxrev.de/communities.htm
Ich kaufe Dein Forum! Angebote bitte an marc at gutt punkt it
AVAST
Mitglied
Beiträge: 3
Registriert: 15.11.2007 19:38

Beitrag von AVAST »

mgutt hat geschrieben:@ avast

Open includes/sessions.php

and edit like this:

Code: Alles auswählen

	// Disallow rewritting for:
	// - specific url parms (f.e. 'mode=confirm', )
	// - files (f.e. "memberlist.$phpEx", )
	// - folders (f.e. 'includes/', )
	//
	$seo_forbidden = array(
		'-',
		'login',
		'mode=confirm',
		'mark=topics',
		'view=',
		'start_letter',
	);
"'start_letter'," is the new line.
danke :lol:
Parse Error
Mitglied
Beiträge: 272
Registriert: 27.12.2006 20:44
Kontaktdaten:

Beitrag von Parse Error »

Hallo mgutt,

wenn ich mich nicht irre, ist da noch ein Bug in Deiner Anpassung für den Recent Topics MOD.

Das Problem: Wenn ein Titel sehr lang ist und gekürzt wird, lautet die URL fälschlicherweise statt z.B.

http:/wvw.slackliner.de/forum/dies-ist-ein-beispiel-fuer-einen-extrem-langen-titel.html

bloß

http:/wvw.slackliner.de/forum/dies-ist-ein-beispiel-fuer-einen-extrem-langen-ti.html

Der Thread ist trotzdem aufrufbar und liefert einen Statuscode 200 -> duplicate content

Die Lösung in der recent.php (ich gebe nur die entscheidenden Codestellen wieder):

Code: Alles auswählen

	$topic_id = $line[$i]['topic_id'];
	$word_censor = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $line[$i]['topic_title']) : $line[$i]['topic_title'];
	$topic_title = $word_censor;
	$topic_url = append_sid("viewtopic.$phpEx?". POST_TOPIC_URL ."=$topic_id");

Code: Alles auswählen

	else
	{
		$goto_page = '';
	}

	// Erst jetzt kürzen wir den Topictitel
	$topic_title = ( strlen($line[$i]['topic_title']) < $topic_length ) ? $word_censor : substr(stripslashes($word_censor), 0, $topic_length) .'...';
Sollte ich mich getäuscht haben, tut es mir Leid. Ist schon spät.
Ich würde Euch aber raten, die Sache zu überprüfen, wenn Ihr mgutts (hervorragenden!) MOD und den Recent Topics MOD installiert habt.

P.E.
Nicht nur für Kletterer: Deutsches Slackline Forum
Antworten

Zurück zu „phpBB 2.0: Mods in Entwicklung“