vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - Replace URL's With Page Title (https://vborg.vbsupport.ru/showthread.php?t=155909)

Jafo232 08-21-2007 10:00 PM

Replace URL's With Page Title
 

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).


SuperTaz 08-22-2007 03:27 AM

I like this...Thanks. Installed

cynthetiq 08-22-2007 03:29 AM

what an interesting idea, thanks I'm going to sample it. installed

Jafo232 08-22-2007 03:30 AM

I have been testing it for a few days, let me know if you come up with any issues.. So far I have really not found any..

SuperTaz 08-22-2007 03:32 AM

Will do.

TTG 08-22-2007 05:05 AM

Quote:

Originally Posted by Jafo232 (Post 1322856)
I have been testing it for a few days, let me know if you come up with any issues.. So far I have really not found any..

Creates a problem if you're using an Ajax shoutbox

Message in shoutbox :-
Quote:

Fatal error: Cannot redeclare convert_url_to_bbcode_callback_auto_title() (previously declared in /home/X/X/forums/public_html/forums/includes/functions_newpost.php(175) : eval()'d code:1)

Jafo232 08-22-2007 05:46 AM

Quote:

Originally Posted by TTG (Post 1322880)
Creates a problem if you're using an Ajax shoutbox

You could rename the function in the plugin code and any call too it in either product.

Dave Hawley 08-22-2007 06:52 AM

Any chance of this working with 3.5.4? I tried installing but it bugged out :(

United32 08-22-2007 07:07 AM

I like this mod, and this is working except the vbshout! I'm not getting error messages but I cannot post messages in the shoutbox.

United32 08-22-2007 07:14 AM

Quote:

Originally Posted by Jafo232 (Post 1322889)
You could rename the function in the plugin code and any call too it in either product.

What exactly I should do? Is everithing using Ajax effected in some way?

Jafo232 08-22-2007 07:35 AM

Quote:

Originally Posted by United32 (Post 1322930)
What exactly I should do? Is everithing using Ajax effected in some way?

Should not affect Ajax at all.

If there is an issue with a conflicting function name in another plugin, just rename functions. As in the shoutbox example, you would open the plugin called Title_Replace and find any instances of this phrase:

convert_url_to_bbcode_callback_auto_title

Change that to a different name, example:

convert_url_to_bbcode_callback_auto_title_Changed

United32 08-22-2007 07:52 AM

Quote:

Originally Posted by Jafo232 (Post 1322940)
Should not affect Ajax at all.

If there is an issue with a conflicting function name in another plugin, just rename functions. As in the shoutbox example, you would open the plugin called Title_Replace and find any instances of this phrase:

convert_url_to_bbcode_callback_auto_title

Change that to a different name, example:

convert_url_to_bbcode_callback_auto_title_Changed

Huh, I have done that, changed two instances of convert_url_to_bbcode_callback_auto_title in Title-Replace.

Only thing I can do in Shoutbox is to erase all the shout withe the prune-command, and post a smiley! After that I try to post smileys, text etc, nothing happens.

It is possible to erase everything with prune-command and post a thing. After that nothing is happening when I try to post something more. Then I must erase again if I want to post a new thing, and so again...

I think that this mode is in conflict with a function from Shoutbox. When I'm posting a new message then Shoutbox display username instead of http://www.mysite.net/forum/member.php?u=1, and your mode is also trying to do the same thing. I'm I right?

projectego 08-22-2007 09:57 AM

Fantastic SEO hack. I'm definitely installing this. Thanks! :)

kaptanblack 08-22-2007 10:02 AM

Thanks very nice hack

rainyleaves 08-22-2007 10:12 AM

Awesome mod.

But didn't work.
HTML Code:

[url="http://****/forums/showthread.php?t=22758"]http://****/forums/showthread.php?t=22758[/url]
What's wrong?

Please fix.....
Thanks. :)

993ti 08-22-2007 10:45 AM

I'm using this one:
https://vborg.vbsupport.ru/showthread.php?t=146679

baghdad4ever 08-22-2007 10:57 AM

Quote:

Links on pages posted prior to adding this mod will not be updated
what do you mean by that

i have 50000 threads in my forum

if i install the hack

this 50000 will not be include??

magnus 08-22-2007 11:22 AM

How is this any different than: https://vborg.vbsupport.ru/showthread.php?t=146679 ?

Also, fopen() is a cludgy function to use and you'll find that many people will be unable to use it on shared hosting accounts (where fopen() is usually disabled in favor of the cURL() function).

Luky 08-22-2007 12:01 PM

This mod has already been made but..

Jafo232 08-22-2007 02:41 PM

Quote:

Originally Posted by United32 (Post 1322950)
Huh, I have done that, changed two instances of convert_url_to_bbcode_callback_auto_title in Title-Replace.

Not using Shoutbox, I am not sure why there would be a conflict. It is possible that it may just not be compatible with it. You could try altering the order of the plugins execution.

Jafo232 08-22-2007 02:42 PM

Quote:

Originally Posted by rainyleaves (Post 1323009)
Awesome mod.

But didn't work.
HTML Code:

[url="http://****/forums/showthread.php?t=22758"]http://****/forums/showthread.php?t=22758[/url]
What's wrong?

Please fix.....
Thanks. :)

Without seeing a real time example of it not working for you, there is nothing to fix.

Jafo232 08-22-2007 02:56 PM

Quote:

Originally Posted by magnus (Post 1323057)
How is this any different than: https://vborg.vbsupport.ru/showthread.php?t=146679 ?

Also, fopen() is a cludgy function to use and you'll find that many people will be unable to use it on shared hosting accounts (where fopen() is usually disabled in favor of the cURL() function).

Well there are several differences.

One being, there is only one plugin, and it uses one hook: url_to_bbcode.

Second, it uses Vbulletins built in method for matching URL's, instead of the one built into this hack.

If the user chooses not to parse links, during a reply or threadpost, then the hack won't override it as the hack you linked to appears to do.

I have never heard of a host disabling fopen, the only thing is when it used to open FILES, and safe mode is on, it will check the UID. However, I do not believe this applies when calling a remote document via http.

cURL on the other hand, must be installed on the system (well at least the libcurl package) whereas fopen is native.

What happens with the other hack when a user say, posts a link to the latest fedora distribution that is 2.7 GB? From what I see of the other hack, the server will attempt to download this entire package before parsing out a title (that it will never find). Of course, it will time out, or give you an exhausted memory error. My mod by contrast, only downloads the first 1000 lines of any document.

This also works with shoutbox or any other plugin that does not bypass the normal posting process, whereas the other only works with the newpost and and edit post hooks.

I hope this answers any of your questions.

Jafo232 08-22-2007 03:09 PM

Quote:

Originally Posted by baghdad4ever (Post 1323036)
what do you mean by that

i have 50000 threads in my forum

if i install the hack

this 50000 will not be include??

All that means is, links in those pages will not be transformed to show titles. The hack will only work on new or edited threads/posts.

Mrdby 08-22-2007 03:36 PM

Installed!!!!

Mrdby 08-22-2007 03:41 PM

UNINSTALL IT MESSED UP MY SHOUT BOX

Fatal error: Cannot redeclare convert_url_to_bbcode_callback_auto_title() (previously declared in //local/home//.net/forum/includes/functions_newpost.php(175) : eval()'d code:1) in //local/home//.net/forum/includes/functions_newpost.php(175) : eval()'d code on line 1

Jafo232 08-22-2007 03:42 PM

Quote:

Originally Posted by Mrdby (Post 1323242)
UNINSTALL IT MESSED UP MY SHOUT BOX

Fatal error: Cannot redeclare convert_url_to_bbcode_callback_auto_title() (previously declared in //local/home//.net/forum/includes/functions_newpost.php(175) : eval()'d code:1) in //local/home//.net/forum/includes/functions_newpost.php(175) : eval()'d code on line 1

As stated in the limitations, may not be compatible with vbshoutbox..

Mrdby 08-22-2007 03:51 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=147346" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=147346</a> oh ok..i use this one.

Jafo232 08-22-2007 04:27 PM

Ok, resolved the issue with shoutbox. When you install, overwrite.

Mrdby 08-22-2007 04:32 PM

so shouldn't you update the verison?

Jafo232 08-22-2007 04:46 PM

Quote:

Originally Posted by Mrdby (Post 1323312)
so shouldn't you update the verison?

The version is updated (1.1)..

semauae 08-22-2007 04:54 PM

I was searching for this hack

thnx alot , installed and I will try now :)

iogames 08-22-2007 07:19 PM

Ok, I've been waiting for this hack for some time... but I use another hack [AME] that parses the URLs converting them on Video, can this affect the functionality of the other hack?

magnus 08-22-2007 08:02 PM

Quote:

Originally Posted by Jafo232
One being, there is only one plugin, and it uses one hook: url_to_bbcode.

One plugin location vs two.. heh.

Quote:

Originally Posted by Jafo232
Second, it uses Vbulletins built in method for matching URL's, instead of the one built into this hack.

Correct, because if you use any other hacks that toy with vB's internal URL parsing routines it will most likely break this hack.

Quote:

Originally Posted by Jafo232
If the user chooses not to parse links, during a reply or threadpost, then the hack won't override it as the hack you linked to appears to do.

This is true, however, because it's by design. From an Admin's perspective, this mod is a great SEO tool. It's mostly for the admin, not necessarily the users.

Quote:

Originally Posted by Jafo232
I have never heard of a host disabling fopen, the only thing is when it used to open FILES, and safe mode is on, it will check the UID. However, I do not believe this applies when calling a remote document via http.

Well, just to name one.. DreamHost. fopen() is generally considered a security risk on shared hosting servers.

Quote:

Originally Posted by Jafo232
URL on the other hand, must be installed on the system (well at least the libcurl package) whereas fopen is native.

You'd be hard pressed to find a shared hosting provider that doesn't have cURL available. And those not using shared hosting can simply install it themselves. But I digress..

Quote:

Originally Posted by Jafo232
What happens with the other hack when a user say, posts a link to the latest fedora distribution that is 2.7 GB? From what I see of the other hack, the server will attempt to download this entire package before parsing out a title (that it will never find). Of course, it will time out, or give you an exhausted memory error. My mod by contrast, only downloads the first 1000 lines of any document.

Well, the first problem here is that someone is trying to download Fedora.. when obviously they should be downloading a superior distribution such as Debian ;). That being said, there's a nifty (.. and configurable!) timeout option. By default, if a page takes longer than 5 seconds to return a title then the process is aborted and the default URL is used.

Quote:

Originally Posted by Jafo232
This also works with shoutbox or any other plugin that does not bypass the normal posting process, whereas the other only works with the newpost and and edit post hooks.

So.. I can hijack a shoutbox and cripple a server by spamming a bunch of links to 10GB ISO's and waiting for it to parse 1000 lines each time I paste it? However way this hack is implemented, by nature it's going to create additional load on the server. Why would you want to add an additional load to something that already puts a ridiculous strain on a server (re: Shoutbox)?

If you're going to provide a link in the OP to compare the differences, the least you could do is make sure the statements are factual.

Jafo232 08-22-2007 08:20 PM

Quote:

Originally Posted by magnus (Post 1323437)
One plugin location vs two.. heh.


Correct, because if you use any other hacks that toy with vB's internal URL parsing routines it will most likely break this hack.

That is why hacks that do not muck with the internal routines are better as opposed to the one you proposed.

Quote:

Originally Posted by magnus (Post 1323437)
This is true, however, because it's by design. From an Admin's perspective, this mod is a great SEO tool. It's mostly for the admin, not necessarily the users.

Well, from my prospective, it is better to worry about the users experience first, not a search engines. The ability to craft a URL without it being mucked by a hack is a requirement for many sites, especially those dealing with code. Your proposed hack limits a users experience.

Quote:

Originally Posted by magnus (Post 1323437)
Well, just to name one.. DreamHost. fopen() is generally considered a security risk on shared hosting servers.

You'd be hard pressed to find a shared hosting provider that doesn't have cURL available. And those not using shared hosting can simply install it themselves. But I digress..

It isn't hard at all. Look how many hacks that require cURL have questions about error messages regarding unfound functions that are part of cURL. There are numerous. If it wasn't a problem, then I fail to see why you mention it in your hack.

Quote:

Originally Posted by magnus (Post 1323437)
Well, the first problem here is that someone is trying to download Fedora.. when obviously they should be downloading a superior distribution such as Debian ;). That being said, there's a nifty (.. and configurable!) timeout option. By default, if a page takes longer than 5 seconds to return a title then the process is aborted and the default URL is used.

The timeout option does NOT stop the download. It is a timeout for a non-response. Please, let us keep it factual.

Quote:

Originally Posted by magnus (Post 1323437)
So.. I can hijack a shoutbox and cripple a server by spamming a bunch of links to 10GB ISO's and waiting for it to parse 1000 lines each time I paste it? However way this hack is implemented, by nature it's going to create additional load on the server. Why would you want to add an additional load to something that already puts a ridiculous strain on a server (re: Shoutbox)?

You mean like search bombing or a million other techniques you can use to DDOS a server? At least what you are speaking of is an intentional act. Posting a link to a large file is common in a forum with no malicious intent. YOUR plugin however makes it seem that way.

Quote:

Originally Posted by magnus (Post 1323437)
If you're going to provide a link in the OP to compare the differences, the least you could do is make sure the statements are factual.

Is it the fact that your lack of understanding of the overall concept that bothers you or that this plugin already has more than half the amount of installs yours has, yet it only took less than 24 hours for a superior hack to do it?

magnus 08-22-2007 08:31 PM

Wow. Ok, pal. Good luck! :rolleyes:

home9000 08-23-2007 09:22 AM

Is it working in 3.6.5 ?

home9000 08-23-2007 09:37 AM

It's working in 3.6.5

but it' give me the name of the forum also in the title . Is it possible to remove it

semauae 08-23-2007 11:51 AM

I tried it

when I write thread link it will display the Forum name

I want to display the thread name

can I ?

Handbag 08-23-2007 12:01 PM

I was just coming on to say that version 1.0 buggered up my polls (ie. users were shown a blank page when trying to post a poll) but v1.1 fixes this, so thanks! :)

rayphua 08-23-2007 12:51 PM

Interesting debate. I'm using yours Jaro, not that Magnus' version wasn't working. But based on what you're saying, I'd rather be safe than sorry. Anyway, the more important point is this, we're all here to better what's currently available on a standard VB package, so thumbs up to both of you.


All times are GMT. The time now is 05:49 PM.

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.01525 seconds
  • Memory Usage 1,850KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (26)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete