1
Anonymous
Hacked the REF Hack :o)
  • 2002/2/27 10:17

  • Anonymous

  • Posts: 0

  • Since:


Liked the idea of the ref hack to make the article into keywords for the meta tags, but hated the way it actually made the keywords... so i hacked it at my turn

No more words with more than 3chars, no more html entities in the keywords, and most importantly: no keyword doubles... and all keywords are made uppercase 1st letter

/* article page output */
global $bodytext;
$htmlless strip_tags($metatitle.",".$bodytext);
$search = array(
        
"/>/i",
        
"/</i",
        
"/&/i",
        
"/"/i",
        
"/'/i",
        
"/[^-w']/i",
        
"/s+/",
        
"/ (.{1,3}),/i",
        
"/(, )$/"
        
);
$replace = array(
        
">",
        
"<",
        
"&",
        
""",
        "'",
        " ",
        ", ",
        "",
        ""
        );
$metatags = preg_replace($search, $replace, $htmlless);
$metatags = explode(", ",$metatags);
$metatags = array_unique($metatags);
$metatags = implode(", ",$metatags);
echo "<meta http-equiv="keywords" content="".ucwords($metatags).""></meta>n";
}
else
{
echo "<meta name="keywords" content="".$meta.""></meta>n";
}
echo "<meta name="description" content="".$xoopsConfig['
slogan'].""></meta>n";
echo "<meta name="generator" content="".$xoopsConfig['
version'].""></meta>nnn";
echo "<meta http-equiv="Content-Type" content="text/html; charset="._CHARSET."" />n";
// Fin - Hack référencement


Feel free to integrate it into the actual ref hack

<small>[ Edited by Half-Dead on 2002/2/27 11:26:00 ]</small>

2
A-dog
Re: Hacked the REF Hack :o)
  • 2002/2/27 11:20

  • A-dog

  • Just popping in

  • Posts: 19

  • Since: 2002/1/25


really sweet. man thats nice. Just installed it. Thanks for the cleanup.
I really enjoyed playing with this one.. headers look great..the SE's will really do their jobs with these keywords...

3
linamix
Re: Hacked the REF Hack :o)
  • 2002/2/27 13:48

  • linamix

  • Just popping in

  • Posts: 6

  • Since: 2002/1/8 8


Merci Half-Dead... Bien joué !

Vive XOOPS !!!

4
ZPC
Re: Hacked the REF Hack :o)
  • 2002/2/27 13:53

  • ZPC

  • Official Support Member

  • Posts: 76

  • Since: 2002/1/16


I found some bugs, like deleting line breaks, deleting country specific characters etc.

I will try to create some addition soon.

5
Anonymous
Re: Hacked the REF Hack :o)
  • 2002/2/27 15:05

  • Anonymous

  • Posts: 0

  • Since:


Tnx all

BUT...Just hacked it up even more and exported all the settings to a config file: much easier to customize. hehe

See: here

If ya wanna fix it up, i'd do it from the version in the above link..much cleaner


---------
Line breaks aint a bug, since keywords shouldnt have any, but your right about the language characters: wasnt thinking about non english sites when i changed it

<small>[ Edited by Half-Dead on 2002/2/27 16:25:28 ]</small>

6
Anonymous
Re: Hacked the REF Hack :o)
  • 2002/2/27 21:31

  • Anonymous

  • Posts: 0

  • Since:


Just updated the hack again, and added the possibility to define unwanted words in the config file...very usefull to remove common crap

Repacked REF Hack

---
updated link

<small>[ Edited by Half-Dead on 2002/3/1 23:59:56 ]</small>

7
Anexia
Re: Hacked the REF Hack :o)
  • 2002/2/27 21:41

  • Anexia

  • Just popping in

  • Posts: 3

  • Since: 2002/2/22


Euh ! Linamix vu que tu parle français/anglais tu pourrais nous traduire ça sur le forum de XOOPS France avec le lien de la nouvelle version de Ref_hack !!!

Sorry ! My english is very bad.
I read english.... but, not speak or write...

<small>[ Edited by Anexia on 2002/2/28 7:36:54 ]</small>

8
Anonymous
Re: Hacked the REF Hack :o)
  • 2002/2/28 11:06

  • Anonymous

  • Posts: 0

  • Since:


Damn! I gotta stop playing with this hack :o)

Just added the possibility to make tags from any section of the site: forum, downloads, links, faq..

It'll be on the main XOOPS news page soon, so stay tuned

9
Rincewind
Re: Hacked the REF Hack :o)
  • 2002/2/28 12:11

  • Rincewind

  • Just popping in

  • Posts: 16

  • Since: 2002/1/14


This is a very usefull hack. However there is a few more feature I would find usefull.

You script cuts out short words like "the" "and" "to" but many words in english are longer than three letters but should also be cut out such as "from", "because", "also", and others. Would it be posible to create a data file of words to exclude. Or crossreferance the keywords with a dictionary file and only include nouns and verbs. Thus excluding all proverbs. I understand this is a bit more than just a hack and could be a leanthy mod. Plus it would have to be upadted with each fresh language supported. However it could be significanly benificial.

Sencondly: Would it be posible for someone out there to create a module that parsed the text on your pages a came back with a word count on each keyword used. This would be usefull to determine how well the search engines may rank you in thier listings. You would be able to alter the keyword density of your documents to optomise your ranking without the overkill of spamming keywords on pages, or the underkill of not enough keywords. I have found problems in underkill before. I once had a web design company site which ranked better under aromatherapy than under web design. This was because one of the clients was an alternative medicine group and so lots of my pages were discussing the clients site and not mine. Indeed at one point my web design site ranked higher for aroatherapy that the aromatherapy site itself. A mod like that discribed above would help predict how search engines will rank your pages before you submit them so you can correct things before it's to late. It's hard enough getting listed in search engines without worrying about listing incorectly.

10
Anonymous
Re: Hacked the REF Hack :o)
  • 2002/2/28 14:04

  • Anonymous

  • Posts: 0

  • Since:


Seems like they takin a bit time with the news :o)

REF Hack v4.1

Already has a wordlist(currently bout 70words big)... and it also does links, downloads, faq, & forum, in addition to the original articles

---
updated link

<small>[ Edited by Half-Dead on 2002/3/1 23:59:00 ]</small>

Login

Who's Online

234 user(s) are online (120 user(s) are browsing Support Forums)


Members: 0


Guests: 234


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits