Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

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
  #62  
Old 09-11-2007, 06:28 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 maxicep View Post
No no,

i know what u said, i know how disable the safe mode but i asked u how can i allow curl_setopt function while safe mode running. So can i configure safe mode settings like curl_setopt : on ?
No. The entire point of PHP safe_mode is to disallow certain functions. To circumvent that would defeat the point of safe_mode (to which, honestly, is a pain in the rear).
Reply With Quote
  #63  
Old 09-11-2007, 07:22 PM
maxicep maxicep is offline
 
Join Date: Oct 2006
Location: California
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok so i disable the safe mode on my server for only that mod
Reply With Quote
  #64  
Old 09-12-2007, 01:44 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 maxicep View Post
Ok so i disable the safe mode on my server for only that mod
Is there a reason you even had safe_mode enabled? It would be fine and dandy if you were serving static content and not much else, but even vBulletin itself benefits from having safe_mode disabled -- not to mention most of the modifcations available here.
Reply With Quote
  #65  
Old 09-12-2007, 05:56 AM
maxicep maxicep is offline
 
Join Date: Oct 2006
Location: California
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Of course, i prefer it for more security .
Reply With Quote
  #66  
Old 09-12-2007, 11:42 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 maxicep View Post
Of course, i prefer it for more security .
The original intent of PHP safe_mode is to provide a bandaid solution for shared server security issues. Since you apparently maintain your own server, you're not really seeing much (if any) benefit to having it enabled.

In fact, it's been removed as of PHP 6.0.0.
Reply With Quote
  #67  
Old 09-15-2007, 07:50 AM
maxicep maxicep is offline
 
Join Date: Oct 2006
Location: California
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for help magnus.

Also i have problem with some Turkish Website Titles.
If title include a Turkish character like "ş, ğ, ı, ç" title looking very bad.

I tried edit the plugin
first line

<?xml version="1.0" encoding="ISO-8859-1"?>

i made it

<?xml version="1.0" encoding="ISO-8859-9"?>

I added this plugin again but iso charset didnt changed, i cant change it?

Should we change it for solve Turkish character problem ?
Reply With Quote
  #68  
Old 09-15-2007, 01:44 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 maxicep View Post
Thanks for help magnus.

Also i have problem with some Turkish Website Titles.
If title include a Turkish character like "ş, ğ, ı, ?" title looking very bad.

I tried edit the plugin
first line

<?xml version="1.0" encoding="ISO-8859-1"?>

i made it

<?xml version="1.0" encoding="ISO-8859-9"?>

I added this plugin again but iso charset didnt changed, i cant change it?

Should we change it for solve Turkish character problem ?
Could you show me an example of what's happening?
Reply With Quote
  #69  
Old 09-17-2007, 01:43 AM
maxicep maxicep is offline
 
Join Date: Oct 2006
Location: California
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure, see below

Fenerbahçe Fan/FB Videoları, FB Resimleri, FB ?�arkıları, FB Yazıları, FB Hakkında Her?�ey

Some characters look bad on some sites?

But site title looking good when i enter the site.
Site title on my explorer
Quote:
Fenerbah?e Fan/FB Videoları, FB Resimleri, FB Şarkıları, FB Yazıları, FB Hakkında Herşey :
Url
Code:
http://fenerbahce-fan.blogspot.com/
Reply With Quote
  #70  
Old 10-11-2007, 04:19 AM
REIGN SS REIGN SS is offline
 
Join Date: Sep 2007
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed works about 80% of the time... I guess it has to due with the External Links Timeout setting, currently at 6seconds... Thanks for the mod!
Reply With Quote
  #71  
Old 11-03-2007, 08:55 PM
Boothby Boothby is offline
 
Join Date: Mar 2002
Location: at home
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For all, having problems with Save Mode on this is my little fix to solve it.

Find twice
PHP Code:
if (function_exists('curl_init') AND $ch curl_init())
{
    
curl_setopt($chCURLOPT_URL$match[1]);
    
curl_setopt($chCURLOPT_TIMEOUT$vbulletin->options['linktitles_timeout']);
    
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
    
curl_setopt($chCURLOPT_HEADERfalse);
    
curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);

    
$file_contents curl_exec($ch);

And replace with:
PHP Code:
$file_contents = @file_get_contents($match[1]); 
Then I added a small tweak to parse url's without a scheme, like "http://".

find twice:

PHP Code:
$url_host $url['host']; 
After it add:
PHP Code:
if(!$url['scheme'])
{
      
$match[1] = "http://" $match[1];

Now it works for me beautyful.

Thanks and installed.
Reply With Quote
Reply


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 07:09 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09254 seconds
  • Memory Usage 2,329KB
  • 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
  • (1)bbcode_code
  • (4)bbcode_php
  • (5)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