Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
External Link Titles, retrieve descriptive titles for URLs Details »
External Link Titles, retrieve descriptive titles for URLs
Mod Version: 1.1.1, by magnus (Member) magnus is offline
Developer Last Online: Feb 2012 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.x Rating: (17 votes - 4.71 average) Installs: 172
Released: 07 May 2007 Last Update: 24 Jul 2007 Downloads: 1107
Not Supported Uses Plugins  

Keywords: SHOWTHREAD, external, link, titles, URLs, SEO

Description:
Retrieves descriptive titles for external posted links. Allows for better link recognition and, in theory, could help increase page SEO.

Details:
I recall this being requested somewhere, so I decided to take a stab at it. This is yet another feature offered in vBSEO.

For those unaware of what this actually does.. by default, when a URL is posted without a description it looks like:
http://www.vbulletin.com

With this modification enabled, it will now look like:
vBulletin.org Forum - The Official vBulletin Resource!

Nicer, eh?



Installation:
  1. Download and import product-linktitles.xml via the Product Manager.
  2. Enable the modification via AdminCP > vBulletin Options > External Link Titles Options (it is disabled by default)
  3. ???
  4. Profit!

Notes:
There's really no magic here, it polls for titles using the cURL() function. If for some reason your host does not have cURL() enabled, you're out of luck.

From time to time you may notice the occasional link that does not get titled -- this is due to either the fact that the url is not active or it either timed out waiting for a response. By default, the system will wait for 5 seconds before timing out. If you wish to modify the timeout, you may do so via the AdminCP.



Comments:
As with all my hacks, this modification is provided free of charge. However, if you find this product useful and have money burning a hole in your pocket, feel free to make a small donation, I won't mind.. really.

Version History:
  • 1.0.0 - Initial release, here's to hoping...
  • 1.1.0 - Added the ability to blacklist specific domains from having link titles retrieved (configurable via the AdminCP)
  • 1.1.1 - Wrapped returned titles in html_entity_decode(); to return properly decoded HTML characters.

Currently Known Bugs:
  • None

* Please note that this modification was developed on a forum with a userbase of 1 (myself). I've tested it for basic functionality but I cannot guarantee functionality or behavior on your forum. So, please -- make backups before installing this product!

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #31  
Old 15 May 2007, 14:48
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Originally Posted by C_P View Post
I get similar error and PHP safe mode is not on:
safe_modeOffOff
safe_mode_gidOffOff
Here is my error:
and after i resolves back to thread it was posted in, my http://www.vbulletin.org displays this as the hyperlink:
301 Moved Permanently link test
Now, this could be do the he anonym modification we have installed. If so, we cannot install this but a nice option none the less.
Well, according to the error:
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /includes/functions_newpost.php(360) : eval()'d code on line 30
It's either one of 2 things. You verified safe mode isn't enabled, so there must be an open_basedir set in functions_newpost.php. You'll need to check for plugins that hook into your the file, and see if there's a way to resolve the error.

The reason the link shows as "301 Moved Permanently" is because vBulletin.org has a redirect to the portal page. The CURLOPT_FOLLOWLOCATION option tells the modification to follow all redirect tags until the end. Since you can't use that option, it stops on the first try.

You can still use the modification, you would simply have to disable CURLOPT_FOLLOWLOCATION and occasionally be stuck with links such as "301 Moved Permanently" in such cases.
Reply With Quote
  #32  
Old 15 May 2007, 14:52
C_P's Avatar
C_P C_P is offline
 
Join Date: Sep 2004
Thank you for the reply and update.
Reply With Quote
  #33  
Old 07 Jun 2007, 05:59
Dave Hawley Dave Hawley is offline
 
Join Date: Jun 2004
Would this work on 3.5.4? If not, is there one for that version?
Reply With Quote
  #34  
Old 13 Jul 2007, 15:45
Quantnet Quantnet is offline
 
Join Date: Nov 2006
Any update on the &amp and quotation issue ?

I have something like this The iPhone - Doesn't Slice, Doesn't Dice, but Will It Blend? | CrackBerry.com
Reply With Quote
  #35  
Old 13 Jul 2007, 16:01
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Originally Posted by Dave Hawley View Post
Would this work on 3.5.4? If not, is there one for that version?
It should work, but I haven't tested. It couldn't hurt to try.
Reply With Quote
  #36  
Old 13 Jul 2007, 16:02
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Originally Posted by Quantnet.org View Post
Any update on the &amp and quotation issue ?

I have something like this The iPhone - Doesn't Slice, Doesn't Dice, but Will It Blend? | CrackBerry.com
To be honest, I completely forgot about that issue. I'll go ahead and take a look at it right now. I'm sure it's an easy fix.

My apologies!
Reply With Quote
  #37  
Old 15 Jul 2007, 09:03
Dave Hawley Dave Hawley is offline
 
Join Date: Jun 2004
It shows this error on import into 3.5.4

Database error in vBulletin 3.5.4:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'Retreive link titles when editing a post', 'editpost_update_process', 'if ($vbulletin->options[\'linktitles_active\'])\r\n{\r\n preg_match_all(\'/\\[url\\](.*)\\[\\/url\\]/Ui\', $edit[\'message\'], $matches, PREG_SET_ORDER);\r\n\r\n foreach($matches as $match)\r\n {\r\n $url = parse_url($match[1]);\r\n $url_host = $url[\'host\'];\r\n $blacklist = preg_split(\'#\\s#\', $vbulletin->options[\'linktitles_blacklist\'], -1, PREG_SPLIT_NO_EMPTY);\r\n\r\n $host_is_blacklisted = false;\r\n foreach ($blacklist as $host)\r\n {\r\n if (preg_match(\'#\' . preg_quote($host, \'#\') . \'$#siU\', $url_host))\r\n {\r\n $host_is_blacklisted = true;\r\n break;\r\n }\r\n }\r\n unset($blacklist);\r\n\r\n if ($host_is_blacklisted == false)\r\n { \r\n if (function_exists(\'curl_init\') AND $ch = curl_init())\r\n {\r\n curl_setopt($ch, CURLOPT_URL, $match[1]);\r\n curl_setopt($ch, CURLOPT_TIMEOUT, $vbulletin->options[\'linktitles_timeout\']);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_HEADER, false);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n\r\n $file_contents = curl_exec($ch);\r\n }\r\n\r\n preg_match(\'/<title>(.*)<\\/title>/i\', $file_contents, $title);\r\n\r\n if ($title[1] != \'\')\r\n {\r\n $edit[\'message\'] = str_replace($match[0], \' . \'\"]\' . $title[1] . \'\', $edit[\'message\']);\r\n }\r\n }\r\n }\r\n}', 'linktitles');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
__________________
Excel Help! Searchable MS Office Help Forums
Reply With Quote
  #38  
Old 24 Jul 2007, 02:15
Quantnet Quantnet is offline
 
Join Date: Nov 2006
Originally Posted by magnus View Post
To be honest, I completely forgot about that issue. I'll go ahead and take a look at it right now. I'm sure it's an easy fix.

My apologies!
Any updates ?
This shouldn't take you this long right ?
Reply With Quote
  #39  
Old 24 Jul 2007, 03:20
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
My blacklist just doesn't work. I tried blacklisting a .net if that makes any diff.

Everything else works, though.
Reply With Quote
  #40  
Old 24 Jul 2007, 12:13
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Originally Posted by Quantnet.org View Post
Any updates ?
This shouldn't take you this long right ?

No, it shouldn't.. and that's the funny part. Everytime I think I have it fixed, I find a character that for some reason won't translate over. It's as if certain html codes are exempt from being translated. I've gotten most simple characters such as &amp;, &copy;, etc. working fine, but other such as foreign lettering and fractions aren't working. It's the damndest thing..
Reply With Quote
  #41  
Old 24 Jul 2007, 12:16
dj_f16 dj_f16 is offline
 
Join Date: Sep 2006
Real name: Metin METE
it gives error code and errors cookie... vBulletin version 3.6.7 pl1
Reply With Quote
  #42  
Old 24 Jul 2007, 12:38
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Originally Posted by dj_f16 View Post
it gives error code and errors cookie... vBulletin version 3.6.7 pl1
Can't help you if you don't tell me what errors. Also, this has been tested and confirmed working on multiple 3.6.7 PL1 installations nor does it have anything to do with cookies.
Reply With Quote
  #43  
Old 24 Jul 2007, 12:54
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Update:
v1.1.1
  • Wrapped returned titles in html_entity_decode(); to return properly decoded HTML characters.
Reply With Quote
  #44  
Old 24 Jul 2007, 12:56
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Originally Posted by TheMilkCarton View Post
My blacklist just doesn't work. I tried blacklisting a .net if that makes any diff.

Everything else works, though.
I just tested the blacklist and can't seem to replicate the problem. I've blacklisted over a dozen various domains and each time they're excluded.

What version of vBulletin are you using? What's the *exact* string of text entered into the blacklist box?

Remember, you must prefix the domain with a period. For example, if you wanted to blacklist microsoft.com, you would enter .microsoft.com into the blacklist text area.
Reply With Quote
  #45  
Old 24 Jul 2007, 12:59
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Originally Posted by Dave Hawley View Post
It shows this error on import into 3.5.4
Ok, this is because v3.5.4 doesn't support execution orders. You can try the attached file, I've removed the executionorder tags -- maybe it will play nice.
Attached Files
File Type: xml product-linktitles_vb3.5.xml (5.7 KB, 9 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 06:32.

Layout Options | Width: Wide Color: