Need REALLY Good Coding Skills

phpBB SEO Premod for phpBB3 support forum.
This premodded version of phpBB3 includes the three different type of URL rewriting for phpBB3 by phpBB SEO. It comes with several other Search Engine Optimization mods installed.

Moderator: Moderators

Need REALLY Good Coding Skills

Postby divinemanwah » Tue Jul 01, 2008 2:10 am

hello, so far i've been using phpbb seo premod for quite a long time now.
and now i've read about this topic of placing the last 5 topics here:

http://www.phpbb.com/community/viewtopi ... 2&t=952855

my only problem is that the links that it can generate are php queries like ...forums/viewtopic.php?f=3455

how can i transform it to links like those of PHPBB SEO? (...forums/FORUM_NAME/TOPIC_TITLE/TILE.html)

here are the codes that i used:


connect.php
Code: Select all
    <?
        require_once("forums/config.php");
        $connection = mysql_connect('MY_SQL_HOST', $dbuser, $dbpasswd) or die(mysql_error());
        mysql_select_db($dbname, $connection) or die(mysql_error());
    ?>


test.php
Code: Select all
    <?
        require_once("connect.php");
       
        $forumQ=mysql_query("SELECT topic_id, forum_id, topic_title, topic_last_post_time FROM phpbb_topics WHERE topic_approved=1 ORDER BY topic_last_post_time DESC LIMIT 10");
        while($forumRow = mysql_fetch_row($forumQ)){
           
            $date=date('D M d, Y g:i a', $forumRow[3]);

            echo $number."<a href=forums/viewtopic.php?f=".$forumRow[1]."&t=".$forumRow[0].">".$forumRow[2]."</a><br>".$date."<br><br>";
        }
    ?>



if you want to look, here is my url to the test file:
www.itspot.co.cc/testest.php
User avatar
divinemanwah
 
Posts: 45
Joined: Tue Apr 01, 2008 10:36 am

Advertisement

Postby SeO » Tue Jul 01, 2008 6:46 am

The easiest way to do so will be to parse GYM Sitemaps RSS Feeds, otherwise you'll have to share more than just the db connect to do the rewriting with all options.

GYM 2.0.B1 is going to be released soon ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby divinemanwah » Fri Jul 04, 2008 11:23 am

yes, i know that using the easy way is very convenient, but can someone please help me here so i can understand PHP much better?

i saw this post and i think it was successful in rewriting it's URLs.

http://www.phpbb-seo.com/boards/phpbb-s ... t2784.html

codes anyone?
User avatar
divinemanwah
 
Posts: 45
Joined: Tue Apr 01, 2008 10:36 am

Postby HB » Fri Jul 04, 2008 1:20 pm

It's the same code here with $topic_data substituted for the variables in your query (topic id, topic type, topic title, forum id, forum title). In other words, fill in these values:

Code: Select all
$topic_data['forum_id'] = ...;
$topic_data['forum_name'] = ...;
$topic_data['topic_id'] = ...;
$topic_data['topic_title'] = ...;
$topic_data['topic_type'] = ...;

And copy the rest of the code from the post cited above. Your query has most of the values you need already. Add the necessary columns from phpbb_topics and probably a join (SELECT t.topic_id... f.forum FROM phpbb_topics t, phpbb_forums f WHERE t.forum_id = f.forum_id AND ...).

BTW, I recommend reading the phpBB code and copying where possible. There are many code excerpts that are very similar to what you want to do (probably in viewtopics.php). For example, the global $db is already initialized and connected, the table names are predefined as constants, etc.
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1512
Joined: Mon Oct 16, 2006 2:25 am

Postby divinemanwah » Fri Jul 04, 2008 1:44 pm

ok, sorry but i'm really confused now..
i don't know if i can use this code on a static page like on my site...
please take a look at www.itspot.co.cc
in my index page, there is a "Latest News" box with the first code (but it contains links without SEO)...
any help?
thanks!
User avatar
divinemanwah
 
Posts: 45
Joined: Tue Apr 01, 2008 10:36 am

Postby divinemanwah » Thu Jul 24, 2008 1:54 pm

anyone? :(
User avatar
divinemanwah
 
Posts: 45
Joined: Tue Apr 01, 2008 10:36 am

Postby dcz » Thu Jul 24, 2008 2:03 pm

The easiest way to do this would be to use the GYM sitemaps & RSS feeds, you could easily grab the links from the feeds, for example using magpie.

More details here : http://www.phpbb-seo.com/boards/gym-sit ... .html#8329

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby divinemanwah » Fri Jul 25, 2008 4:33 am

yes, but i think that inculdes also the latest replies too.
User avatar
divinemanwah
 
Posts: 45
Joined: Tue Apr 01, 2008 10:36 am

Postby dcz » Fri Jul 25, 2008 1:10 pm

No, you can chose the feed you want, with or without content, first or last post url.

And the url will be properly rewritten without further efforts.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby Professional » Sat Jul 26, 2008 8:08 am

hi i want some help for creat a code.
i installed a ajax chat but it had some problem that after login it some times log out ,and in instruction i shoud add this code:
Code: Select all
if (!$user->data['is_registered'])
{
redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'));
}


now that problem solved but when i want to go too ACP it happend again,now i want a code like that but after login it redirect to ACP not index.
tnx

i think i shoud change is_registered and that other line.
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Postby dcz » Sat Jul 26, 2008 8:12 am

Well this is pretty much off topic. Could you repost with a link to where the mod is available ?
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby Professional » Sat Jul 26, 2008 8:39 am

dcz wrote:Well this is pretty much off topic. Could you repost with a link to where the mod is available ?


sure dear dcz :)
here is topic:
http://www.phpbb-seo.com/boards/phpbb3- ... html#18905
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Postby divinemanwah » Thu Aug 14, 2008 3:03 am

SeO wrote:The easiest way to do so will be to parse GYM Sitemaps RSS Feeds, otherwise you'll have to share more than just the db connect to do the rewriting with all options.

GYM 2.0.B1 is going to be released soon ;)


well, GYM is out now....

can i get help with this code now?

thanks! :roll:
User avatar
divinemanwah
 
Posts: 45
Joined: Tue Apr 01, 2008 10:36 am

Postby SeO » Thu Aug 14, 2008 12:01 pm

Haven't you seen the demo :
http://phpbb3.phpbb-seo.net/demo/rss-links.php
http://phpbb3.phpbb-seo.net/demo/rss-messages.php

It's very easy to display link lists from any RSS feeds on any phpBB page, with and without the description content, take a look at the new GYM install file for more details.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm


Return to phpBB SEO Premod

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 27 guests