Googletap with keywords in Url like in this Forum

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Googletap with keywords in Url like in this Forum
fogel
CZ Newbie
fogel has been a member for over 17 year's 17 Year Member
Status: Offline
Joined: Jun 29, 2007
0.00 posts per day
Posts: 2
Points: 0
   
Hi there,

where can i find the codes for transforming my forums url into "thread-name.html"?



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
You have to add them into your URL's the use mod_rewrite to automagically chnage them. Do you have google tap installed?




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
fogel
CZ Newbie
fogel has been a member for over 17 year's 17 Year Member
Status: Offline
Joined: Jun 29, 2007
0.00 posts per day
Posts: 2
Points: 0
   


Originally posted by Telli @ Sun Jul 01, 2007 6:06 am:

You have to add them into your URL's the use mod_rewrite to automagically chnage them. Do you have google tap installed?


Sure .. i got Googletap installed .. but the urls look like this: "...ftopict-7196.html" .. here in this forum the thread-name appears in the url .. can't you share the codes?

I guess the .htaccess or GT-forums.php files needs to get the thread-names from the db.




Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
No that isnt required because you only have to pass the id to the script for it to work. You have to edit each URI and add the title to it same for googletap.


&title=$title


You will also have to change the title to not contain spaces or special characters.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: Googletap with keywords in Url like in this Forum
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
I am very intrested in this as well but a little confused on how to approach this?

Telli you mention we have to add the $title to the urls, would you care to give an example and what would we use to escape special characters from the url, like commas ' or the & symbol or making them lower case etc...

I assume you mean to edit te files viewtopic.php and add the $title variables there but i think it best to require further guidance before I make a total mess of it!

xtrax1 icon_biggrin.gif




Back to top Reply with quote
#6   re: Googletap with keywords in Url like in this Forum
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
Well I started with something simple like the artcles section and got 90% percent working however having slight problem with ? marks in the title and for articles that alread have a - its becoming -- any suggestions??

This is what I got so far

$title2 = ereg_replace(" ", "-", $title);

I have this one to but it wasnt working

$title2 = ereg_replace("?", "", $title);

xtrax1




Back to top Reply with quote
#7   re: Googletap with keywords in Url like in this Forum
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
ok after hours of work I got the article section, but need a little assitance with the forums on what to edit and where?

xtrax



Back to top Reply with quote
#8   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
str_replace is much faster.


function prepare_title($title) {
   //this is how telli (http://www.codezwiz.com) gets seo titles
   $abc = "1234567890abcdefghijklmnopqrstuvwxyz_";
   $title = strtolower($title);
   $r = '';
   for($i=0; $i < strlen($title); $i++) {
      if (strpos($abc, $title[$i]) !== false) {
         $r .= $title[$i];
      }
      if ( ($title[$i] == ' ') && ($r[strlen($r)-1] != ' ') ) {
         $r .= ' ';
      }
   }
   $r = trim($r);
   return str_replace(' ', '-', $r);
}


To use:


$seo_title = prepare_title($title);
modules.php?name=Forums&file=viewtopic&t=$topic_id&title=$seo_title


If your having problems post a bit of the code where the issue is.

I'm sure this will end up in one of the Nuke forks with the credits removed. icon_sad.gif





_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#9   re: Googletap with keywords in Url like in this Forum
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
Thanks Telli,

This is definetley much easier then what I had, I was using the following

$title2 = ereg_replace(" ", "-", $title);
    $title2 = str_replace ('?', '', $title2);
    $title2 = str_replace ('!', '', $title2);
    $title2 = str_replace ('–', '', $title2);
    $title2 = str_replace (':', '', $title2);
    $title2 = str_replace ("'", "", $title2);
    $title2 = str_replace ('.', '', $title2);
    $title2 = str_replace (',', '', $title2);
    $title2 = str_replace ('--', '-', $title2);
    $title2 = strtolower($title2);


Then I would add the variable $title2 to the urls...

Now If I use your function to clean the urls what file would I put that in to make it work with the forums?

and same goes for the $seo_title, where would that need to be placed?

I am sorry to hear that your scripts have become part of the forks ripped without your credits!

When are users going to appreciate the time it takes in developing these mods?

I will be sure to Surround the URL with a credit line like the following

<!---SEO URLS MOD BY CODEZWIZ.COM TELLI-->

xtrax1 icon_sad.gif




Back to top Reply with quote
#10   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
You can add it in your mainfile.php and use it either place from there.

The line of credit in the code is all I ask for, sad thing is they can't even leave that.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum