PHP Classes

Autolink Keywords: Automatically creates links for content keywords

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 53%Total: 4,781 All time: 574 This week: 488Up
Version License PHP version Categories
autolink 1.0.0GNU General Publi...4HTML, Content management, SEO
Description 

Author

This class can generate links for the keywords of text content.

The class takes a list of keywords for links and another list of keywords associated to text content.

These content keywords may have been extract from the content itself with the automatic keyword generator class.

For each of the content keywords that match any link keywords, this class will find the keywords in the content text and replaces it with a link to the respective link keyword URL.

The search for the keywords may be case sensitive or not.

The keyword links will have a configurable CSS class and ID attribute.

Picture of Ver Pangonilo
Name: Ver Pangonilo <contact>
Classes: 3 packages by
Country: Philippines Philippines
Age: ???
All time rank: 681 in Philippines Philippines
Week rank: 216 Down3 in Philippines Philippines Down
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Details

Note: ===== The output of the automatic keyword generator will used as an input to this class thus its inclusion on this class files. TO DO: ====== 1. Create a list of keyword and corresponding link. $keyword_array = array( "security" => "http://myscripts.itsp.info", "state" => "http://myscripts.itsp.info", "technology" => "http://myscripts.itsp.info", "passport" => "http://myscripts.itsp.info", "department" => "http://myscripts.itsp.info", "passports" => "http://myscripts.itsp.info", "radio" => "http://myscripts.itsp.info", "bruce" => "http://myscripts.itsp.info" ); This list could be an output from a database query. Example1 shows this method. 2. Create a file for list of keyword and corresponding link. The file "linkedKeywords.php" shows how to do this. A php file is used for better security. Example2 shows this method. 3. Autolink class includes an "id" and "class" for easy formatting of linked keywords. 4. Replacement type: CASE INSENSITIVE: $type = "i"; *This type of replacement is on example 1. CASE SENSITIVE: $type = NULL *This type of replacement is on example 2. *This is the recommended replacement type to prevent proper words being replaced with lower case letters.

  Files folder image Files (6)  
File Role Description
Plain text file class.autokeyword.php Class Automatic Keyword Generator Class
Plain text file class.autolink.php Class Autolink Keyword main class file
Accessible without login Plain text file Example1.php Example Example 1 using case insensitive replacement and online keyword array list
Accessible without login Plain text file Example2.php Example Example 2 using case sensitive replacement and a separate keyword array list file
Accessible without login Plain text file linkedKeywords.php Aux. Sample keywords link list file
Accessible without login Plain text file README.txt Doc. Instructions

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
Downloadautolink-2007-01-08.zip 11KB
Downloadautolink-2007-01-08.tar.gz 7KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
Automatic Site Keyword Generator Download .zip .tar.gz The output of this class is used as an input to the Autolink Keywords class Recommended
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,781
This week:0
All time:574
This week:488Up
User Ratings User Comments (2)
 All time
Utility:67%StarStarStarStar
Consistency:65%StarStarStarStar
Documentation:64%StarStarStarStar
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:2200
 
Class does not skip text already in <a>, etc.
14 years ago (Dru Shockley)
12%Star
Great! =)
15 years ago (Diego Medeiros)
80%StarStarStarStarStar