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
Replace URL's With Page Title Details »»
Replace URL's With Page Title
Version: 1.1, by Jafo232 Jafo232 is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.8 Rating:
Released: 08-21-2007 Last Update: 08-21-2007 Installs: 467
Uses Plugins
 
No support by the author.


This product will automatically take any incoming parsed link and display the title of that page instead of showing the URL.

Example:

https://vborg.vbsupport.ru/index.php

Is how URL's are displayed by default, after adding this plugin, automatically the page title of that URL will be displayed and linked:

VBulletin.org Forum

The only thing required to install is to upload the product file (see readme in attached file).

For those asking what the difference is between this mod, and a similar one, see my post here:

https://vborg.vbsupport.ru/showpost....7&postcount=23

Limitations:
  • If the page has no title tag, only the URL will be displayed.
  • If the title tag does not appear within the first 1000 lines of the page, only the URL will be displayed. To keep the script from locking on URL's that go to large files or other large documents that could put a strain on the server and timeout a post, only the first 1000 lines are accepting when retrieving the page information.
  • Links on pages posted prior to adding this mod will not be updated.
Changelog:
  • Aug 22-2007: Fixed issue where functions might redeclare themselves, especially with shoutbox.
(note 49 downloads v1.0)

If you enjoy this mod, please nominate it for mod of the month (MOTM).

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Avimelech

Comments
  #92  
Old 12-10-2007, 02:03 AM
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I assume you will have to edit a template or a VB setting to use the threads title for the page title.. I kinda thought they all did already, but maybe your template needs updating..
Reply With Quote
  #93  
Old 12-10-2007, 11:18 AM
karnevil karnevil is offline
 
Join Date: Feb 2007
Location: Derbyshire
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Jafo - been trying to work it out for ages and have got completely nowhere.

Heres how the links come up

http://www.legalbeagles.info/forums/...ead.php?t=3539

On VB org they come up as

https://vborg.vbsupport.ru/showthrea...=155909&page=7

On another site where it does work they come up as

http://www.consumeractiongroup.co.uk...olicitors.html


Thats what I want mine to do....
Reply With Quote
  #94  
Old 12-10-2007, 12:30 PM
karnevil karnevil is offline
 
Join Date: Feb 2007
Location: Derbyshire
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahhh think we ran out of VBSEO....

Is that the only way to do it ?
Reply With Quote
  #95  
Old 12-10-2007, 04:03 PM
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure what is happening, because the site you link to isn't online..
Reply With Quote
  #96  
Old 12-19-2007, 04:11 AM
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by karnevil View Post
Ahhh think we ran out of VBSEO....

Is that the only way to do it ?
I have no idea what you are saying.
Reply With Quote
  #97  
Old 12-19-2007, 11:06 AM
Satz Satz is offline
 
Join Date: Dec 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i tried everythin..still no luck for me

there is no way otherthan buying VBseo ? for Title_based_url.html ?
Reply With Quote
  #98  
Old 12-19-2007, 03:48 PM
katan katan is offline
 
Join Date: Jul 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks you!!!
Reply With Quote
  #99  
Old 12-19-2007, 04:29 PM
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Satz View Post
i tried everythin..still no luck for me

there is no way otherthan buying VBseo ? for Title_based_url.html ?
This mod does not create title_based_url.html. Your misunderstand it.
Reply With Quote
  #100  
Old 12-19-2007, 05:08 PM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Go to the admin CP

Plugins & Products -> Plugin Manager

Look for "Product : Title Replace"

Edit the plugin labeled Title Replace
Replace the contents of the Plugin PHP Code with the code below.

The code below does NOT use cURL or fopen and does not run into the problem of either cURL not being installed or hosts that have URL opens with fopen disabled.

fsocketopen will retrieve the first 8k of the HTML file to look for the <title></title> tags. if it does not find them, it will end the connection and return the pasted URL as is.

I should warn you that i havent tested this code for basic PHP Errors. it would be wise to copy the existing plugin PHP Code to notepad for a backup before pasting the code below.

-- See my post below with the change that uses fread() opposed to while(!feof(resource) )
Reply With Quote
  #101  
Old 12-19-2007, 05:36 PM
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This above code entry does NOT just open the first 8k.. Consider:

Code:
<?php
error_reporting(E_ALL);

function auto_title_http_get($url){ 

        $url_stuff = parse_url($url); 
        $port = isset($url_stuff['port']) ? $url_stuff['port'] : 80; 

        $fp = fsockopen($url_stuff['host'], $port); 

        $query  = "GET " . $url_stuff['path'] ."?". $url_stuff['query'] . " HTTP/1.0\n"; 
        $query .= "Host: " . $url_stuff['host']; 
        $query .= "\n\n"; 

        fwrite($fp, $query); 

        while ($tmp = fread($fp, 8192)) 
        { 
            $buffer .= $tmp; 
        } 

        preg_match('/Content-Length: ([0-9]+)/', $buffer, $parts); 

        return substr($buffer, - $parts[1]); 

    }


echo auto_title_http_get('http://fedora.inode.at/6/i386/iso/FC-6-i386-DVD.iso');

?>
And watch your servers memory get gobbled up and and PHP timeout.. Hence why fopen is preferred.
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 05:49 AM.


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.06157 seconds
  • Memory Usage 2,308KB
  • 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
  • (2)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
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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