Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
External Link Titles, retrieve descriptive titles for URLs Details »»
External Link Titles, retrieve descriptive titles for URLs
Version: 1.1.1, by magnus magnus is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.x Rating:
Released: 05-06-2007 Last Update: 07-23-2007 Installs: 174
Uses Plugins
 
No support by the author.

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?

[hr]-[/hr]
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.

[hr]-[/hr]
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!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 05-15-2007, 12:48 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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:
Quote:
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
  #33  
Old 05-15-2007, 12:52 PM
C_P's Avatar
C_P C_P is offline
 
Join Date: Sep 2004
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the reply and update.
Reply With Quote
  #34  
Old 06-07-2007, 03:59 AM
Dave Hawley Dave Hawley is offline
 
Join Date: Jun 2004
Location: Australia
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would this work on 3.5.4? If not, is there one for that version?
Reply With Quote
  #35  
Old 07-13-2007, 01:45 PM
Quantnet Quantnet is offline
 
Join Date: Nov 2006
Location: NYC
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #36  
Old 07-13-2007, 02:01 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
  #37  
Old 07-13-2007, 02:02 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
  #38  
Old 07-15-2007, 07:03 AM
Dave Hawley Dave Hawley is offline
 
Join Date: Jun 2004
Location: Australia
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It shows this error on import into 3.5.4

Quote:
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
Reply With Quote
  #39  
Old 07-24-2007, 12:15 AM
Quantnet Quantnet is offline
 
Join Date: Nov 2006
Location: NYC
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
  #40  
Old 07-24-2007, 01:20 AM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My blacklist just doesn't work. I tried blacklisting a .net if that makes any diff.

Everything else works, though.
Reply With Quote
  #41  
Old 07-24-2007, 10:13 AM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply

Thread Tools

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

Forum Jump


All times are GMT. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04589 seconds
  • Memory Usage 2,310KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete