It shows that you are unregistered. Please register with us by clicking Here
![]() |
|
![]() |
![]() | Register - FAQ - Today's Posts - New Posts - Support - Search | ![]() |
|
|
#1 (permalink) |
|
Junior Member
Join Date: Jul 2006
Age: 30
Posts: 11
|
Hi,
I want to share you with information about SEF/Search Engine Optimization mod from http://www.smfseo.org/ Installation and configuration - its easy and fast :) Links look fine, works great. But, there is a dark side of power too ;-) Modification added by mod could down your action=who site (Users Online details) (and some places in administration panel) The reason is simple (solution is less simple unfortunately). If you look in code of subs.php and who.php you see that information about topic/board user in are stored in (...)_log_online and two arrays. Search Engine Optimization-Mod modify all values in topic/board variables, so instead integers we'll see names from uri. This names are stored in columns (...)._topic_lookup.topic_text and (...)smf_boards.board_text. You have to add some queries in who.php to back-translating from name to integers. In my opinion optimum places are after lines with code : (topics) Code:
if (isset($actions['topic'])) Code:
if (!empty($board_ids)) patch for topics: Code:
if (is_numeric($actions['topic'])) {
$int_topic = (int)$actions['topic'];
} else {
$req_topic = db_query("
select ID_TOPIC
from {$db_prefix}topic_lookup
where topic_text = '".$actions['topic']."'", __FILE__, __LINE__);
while ($row2 = mysql_fetch_assoc($req_topic))
{
$int_topic = $row2["ID_TOPIC"];
}
}
$topic = $int_topic;
patch for boards Code:
$boards = array_keys($board_ids);
$textBoard = array();
for ($aa=0;$aa<count($boards);$aa++) {
if (!is_numeric($boards[$aa]) && $boards[$aa] !='') $textBoard[] = "'".$boards[$aa]."'";
}
$sql = "SELECT b.ID_BOARD, b.board_text
FROM {$db_prefix}boards AS b
where b.board_text in (".implode(',',$textBoard).")";
$result = db_query($sql, __FILE__, __LINE__);
$newBoard = array();
while ($row = mysql_fetch_assoc($result))
{
for ($aa=0;$aa<count($boards);$aa++) {
if ($boards[$aa]==$row['board_text']) {
$newBoard[$row['ID_BOARD']] = $board_ids[$row['board_text']];
$boards[$aa]=$row['ID_BOARD'];
}
elseif (is_numeric($boards[$aa]) && $boards[$aa]==$row['ID_BOARD'])
{
$newBoard[$boards[$aa]] = $board_ids[$boards[$aa]];
}
}
}
mysql_free_result($result);
$board_ids = array();
foreach($newBoard as $key => $row) if (count($row)>0) $board_ids[$key] = $row;
Example above is still testing, so correction possible ;) P.S. Sorry for my english, ask if my explanations are unclear
__________________
Greetings, pecado<br /><br />Technical administrator of <br />knives.pl - ostra dyskusja |
|
|
|
|
|
|
|
#3 (permalink) | |
|
Junior Member
Join Date: Jul 2006
Age: 30
Posts: 11
|
Quote:
As I wrote - information about boards and topics in "pure" version are IDs of. Search Engine Optimization mod replace this IDs with URI names stored in colums I wrote above. Unfortunately is unfinished (?) because do not change mechanism of who.php log reading. If you query log_online table you see that any user on forum has his record with informations about place and action. Search Engine Optimization-mod changed informations in php arrays which one are source of data in this table (see in subs.php for code of this action) Who.php reads this informations and query (...)_topic and (...)_boards tables to get a real names. When a stored data are Search Engine Optimization-uri names, not IDs, this queries will fail. My patches adding translating from Search Engine Optimization-uri back to IDs for who.php only, 'cause others "sources" are correctly modified and has this feature implemended. If you track code in Who.php you'll see that my patch change nothing, this is only additional code _before_ "for-names" queries. Is now better? :) Something about benefits. Cool URI's that's one. But, in package we could find great tool to generate xml sitemaps in Google format. Remember - this tool using tables created by SEOmod, so installation at first ;-) File call smfseo_sitemap.php. To use this tool you have to create subdirectories tree in forum location: - sitemaps |_ google |_cats |_boards All dirs have to be on 777 rights - remember about that! Use http://forum/smfseo_sitemap.php to begin sitemap creation. Choose one of three options, confirm and ta-dam! Sitemap file are wainting in: ad. 1st option -> ./sitemamps/ ad. 2nd option -> ./sitemaps/cats/ ad. 3rd option -> ./sitemaps/boards/ My forum has about 3000 topics and 5000 links viewable without logon, but I'm still using 1st option. Sitemap has less then 1MB. And here we have a problems againg :( Sitemaps has bugs, a lot of bugs, but - ease to correct. (Below I'll use examples about sitemap generated by 1st option) 1. Multiple </urlset> tag. This tag ends urls list and could be only one, at end of file. You have to replace all copies of this tag, except the last one. 2. "NEED A DATE" (wtf?!) values in <date></date> tag. I used to mass-replace this value to current date in format "YYYY-MM-DD". After this corrections xml file is ready to publish them for google :-) Of course - script is simple and short, so finding reasons of bugs should be easy, but I'm lazy ;) Have fun :-) P.S. Rob - as you wish :)
__________________
Greetings, pecado<br /><br />Technical administrator of <br />knives.pl - ostra dyskusja |
|
|
|
|
|
|
#4 (permalink) |
|
Member
Join Date: Jul 2006
Posts: 95
|
Did you post this on the SMFSEO - Reclaim the search engines And let them know of the problem? It would be great if this could be added to the new release.
|
|
|
|
|
|
#6 (permalink) | |
|
Senior Member
Join Date: Jul 2008
Posts: 100
|
Quote:
I'm also have tried this seo4smf before and I would like to say that the person who created this application is really smart and creative. Thanks for the creation, we now can enjoy the benefit of it. |
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What are the benefits of using technorati? | mann3r | All Other SE's & Directories | 3 | 11-11-2006 05:43 AM |
| Feedback Encouraged - Benefits of using RSS feeds for content? | kevin | Search Engine Optimization | 3 | 10-11-2006 03:11 AM |
| friend w/ benefits Qs | marife7mission | All Things General | 63 | 06-20-2006 06:48 PM |
| problems. | bob | All Things General | 3 | 05-17-2006 03:08 AM |