vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Replace Local Links With Title (https://vborg.vbsupport.ru/showthread.php?t=100449)

Jafo232 11-08-2005 10:00 PM

Replace Local Links With Title
 
Please note, this hack is NO LONGER SUPPORTED. I have built a new mod that accomplishes the same thing but the method is completely different. To avoid confusion, I just created a new mod. You can find the new mod here:

https://vborg.vbsupport.ru/showthread.php?p=1322843










CHANGELOG:

1.01

Added support for threads with the newpost and lastpost attributes in the query string.

Made matches less greedy.

-----------------------------------

I wish I could come up with a better name for this plugin..

Basically what this does is if someone posts a link in a thread that links to a thread in your forum, it will replace the link text with the title of that thread.

For example:

https://vborg.vbsupport.ru/showthread.php?t=83252

Would automatically be displayed as:

Hacks should be released in ONE ZIP file please

This is for version 3.5.x and should work for future versions unless they move hooks around.

As far as support, I will reply to this thread when I can.

Installation is simple, go to your admin cp, click plugin system, click download/upload plugin and upload the attached plugin.

NOTE: The second xml file (vbulletin-plugins-anon.xml) is ONLY needed for the anonymizer hack. If you have that hack installed, then use the second file, otherwise, use the first. Only install the second file IF you use the anonymizer hack. It is either or, don't install both!

Also note if you have other plugins that alter links other than the anonymizer, such as mods that make your links look like html pages, or in anyway alters links entered into posts, then this will probably not work for you.

The only other thing you should do after that is CLICK INSTALL. :)

C_P 11-09-2005 11:54 AM

Hmm, not sure if it is because we use the anonymiser plug in but no go at my site using 3.51

Jafo232 11-09-2005 11:56 AM

Not sure what that anonymiser plugin is, but make sure you enable this plugin, and that you are using LOCAL links. It will not link titles to other forums, just your own.

Jafo232 11-09-2005 11:59 AM

You should also note that it will not parse titles if someone links to a particular post in a thread, only if they link to the thread itself.

michaelbenson 11-09-2005 12:00 PM

Thanks for this, will this replace links already posted before applying the plugin?

Jafo232 11-09-2005 12:01 PM

Quote:

Originally Posted by michaelbenson
Thanks for this, will this replace links already posted before applying the plugin?

Yes it will. It does not modify any database data, it parses it after it is retrieved.

C_P 11-09-2005 12:10 PM

The plug in defaults to Active. The link I added was the title thread of another internal forum. See my example here
http://www.cpfools.com/forum/showthr...1929#post11929

Jafo232 11-09-2005 12:17 PM

Quote:

Originally Posted by C_P
The plug in defaults to Active. The link I added was the title thread of another internal forum. See my example here
http://www.cpfools.com/forum/showthr...1929#post11929

I think this is because of your anonymizer hack, because if you look at the link in that thread:

http://www.cpfools.com/forum/showthread.php?t=4281

The actual link is:

http://www.anonym.to/?http://www.cpfools.com/forum/showthread.php?t=4281

Which will mean nothing to the plugin. The plugin will search for the setting you have for Forum URL in your vbsettings and ignore all other URL's. The only way that MIGHT work, and I am not sure is if you change your Forum URL setting to:

http://www.anonym.to/?http://www.cpfools.com/forum

C_P 11-09-2005 12:21 PM

That is what I suggested in first post. May need to add a *Won't work with anonymizer plug in.
Good mod though.

Jafo232 11-09-2005 12:27 PM

Quote:

Originally Posted by C_P
That is what I suggested in first post. May need to add a *Won't work with anonymizer plug in.
Good mod though.

I am not familiar with the anonymizer hack, but I modified the original plugin and attached it to the mod post up top. Try that one, it should work for you (vbulletin-plugins-anon.xml).

C_P 11-09-2005 12:30 PM

New plug in with Anon add-in worked like a charm! Clicked install

Lea Verou 11-09-2005 12:54 PM

Thanks m8! This looks awsome!! :D

Lea Verou 11-09-2005 12:56 PM

Btw did you start coding the plugin from the me irc hack? :p

Jafo232 11-09-2005 01:00 PM

Quote:

Originally Posted by Loukrhtia
Btw did you start coding the plugin from the me irc hack?

Yeah, I was tinkering with that hack because it is broken (see my post in that thread). It gave me the inspiration for writing this hack.

Lea Verou 11-09-2005 01:02 PM

Sorry for a 3rd post but this plugin has quite a lot of bugs...
1. If you want another text displayed and not the title it doesn't appear, only the link does.
2. Sometimes it does not parse the URL

for these reasons I will disable the plugin but I will not click uninstall cause I hope these will be fixed and I want to be notified :)

Lea Verou 11-09-2005 01:03 PM

Quote:

Originally Posted by Jafo232
Yeah, I was tinkering with that hack because it is broken (see my post in that thread). It gave me the inspiration for writing this hack.

Lol, I did the same thing with another hack of mine (the custom smilie bbcode) so I remembered the variables, lol. Gotcha! :p

Jafo232 11-09-2005 01:03 PM

Quote:

Originally Posted by Loukrhtia
Sorry for a 3rd post but this plugin has quite a lot of bugs...
1. If you want another text displayed and not the title it doesn't appear, only the link does.
2. Sometimes it does not parse the URL

Can you either post or PM me an example? I cannot replicate what you mean..

Lea Verou 11-09-2005 01:09 PM

Quote:

Originally Posted by Jafo232
Can you either post or PM me an example? I cannot replicate what you mean..

Write for example "blah blah" and then select it, click the url button and enter the thread url. If you post you'll see that "blah blah" is lost and replaced with the link of the thread.
As for the other bug I don't know when it happens :( It seems to occur randomly but quite often... :(

Jafo232 11-09-2005 01:11 PM

Quote:

Originally Posted by Loukrhtia
Write for example "blah blah" and then select it, click the url button and enter the thread url. If you post you'll see that "blah blah" is lost and replaced with the link of the thread.
As for the other bug I don't know when it happens :( It seems to occur randomly but quite often... :(

Are you using the anonymizer version? I just tried highlighting text, and entering the link, and it works fine for me.

Jafo232 11-09-2005 01:12 PM

Otherwise my guess is, it is conflicting with another plugin you have that uses the postbit_display_complete hook..

Lea Verou 11-09-2005 01:13 PM

Quote:

Originally Posted by Jafo232
Are you using the anonymizer version? I just tried highlighting text, and entering the link, and it works fine for me.

Nope, I'm using the normal version.
I wish I could give you the url for it but my Testing board is hidden from normal members and also I have disabled the plugin...
Do you have a board in which I could try to replicate the problem? :)

The only hack I have in that hook is mine and I'm sure it doesn't conflict as it's totaly different (it parses the bbcode [smilie=1,2,3] for example)

Jafo232 11-09-2005 01:17 PM

Quote:

Originally Posted by Loukrhtia
Do you have a board in which I could try to replicate the problem? :)
[smilie=1,2,3] for example)

Shot you a PM. :)

croportal 11-09-2005 03:22 PM

it doesnt working

http://www.croportal.net/forum/showt...6281#post26281 see this

GamerzWorld 11-09-2005 03:31 PM

Nope not working for me either on Vbulletin 3.5 :(

Boofo 11-09-2005 05:18 PM

Isn't this variable used by a few other plug-ins?

PHP Code:

 $mepattern 

I think Dean's meIRC hack used that for one, doesn't it? I could be wrong, though. ;)

rb290 11-09-2005 05:29 PM

hmm dont think it worked
gotta enable it anywhere ?

rb290 11-09-2005 05:48 PM

oh does this work for 3.5 ?

C_P 11-09-2005 05:56 PM

A little clearification.
1. I am running it fine in 3.5.1
2. Regarding this quote
Quote:

NOTE: The second xml file (vbulletin-plugins-anon.xml) is ONLY needed for the anonymizer hack. If you have that hack installed, then use the second file, otherwise, use the first. Only install the second file IF you use the anonymizer hack. It is either or, don't install both!
You only need the second xml file IF you are also anonymizing internal links.
i.e. have located in Local addresses are not anonymized If you leave this option blank, the value for vBulletin Options Cookie Domain will be used
area of the Link Anonymizer

Lea Verou 11-09-2005 06:45 PM

Quote:

Originally Posted by Boofo
Isn't this variable used by a few other plug-ins?

PHP Code:

 $mepattern 

I think Dean's meIRC hack used that for one, doesn't it? I could be wrong, though. ;)

Boofo I've already asked that above, lol

Boofo 11-09-2005 08:03 PM

Quote:

Originally Posted by Loukrhtia
Boofo I've already asked that above, lol

You asked if anything conflicted with this. I was pointing out what it MIGHT be. ;)

Jafo232 11-09-2005 08:36 PM

Quote:

Originally Posted by croportal

Because you are using another hack to make your pages look like html pages. It conflicts with the hack.

This will only parse links that look like so:

http://yourdomain.com/path/to/your/f...ead.php?t=3123

In otherwords, if you have another plugin that parses or in any other way alters links, this plugin will not work.

Jafo232 11-09-2005 09:41 PM

Most of the problems people seemed to be having was when using goto=lastpost or goto=newpost attributes in the query string, which the original hack would not parse.

Added support for these in the hack and speeded up the match routine to make them more greedy.

If you have version 1.0, just uninstall that plugin, and reinstall 1.01.

Casperddc 11-09-2005 10:01 PM

Put it on the boards this morning - thanks!

Jafo232 11-14-2005 10:05 AM

It should just be noted that if you have a hack that already alters links in some sort of way, this might not work for you (except anonymizer).

revlisoft 11-29-2005 05:42 AM

Is there a fix available for when there are 2 links in the same post? When that happens the following link gets it's title replaced too.

AshokForums.com 11-29-2005 07:49 PM

Wow brilliant!! Thanks.. just what i needed!

007 11-30-2005 12:53 AM

Great idea! Thanks. :)

bplinson 11-30-2005 09:31 AM

Installed. Working Good

Ramsesx 11-30-2005 03:09 PM

Hm, it doesn't show in the plugins system, what name should it have, Replace Local Links With Title ?

Mastar 12-01-2005 04:19 PM

Quote:

Originally Posted by Ramsesx
Hm, it doesn't show in the plugins system, what name should it have, Replace Local Links With Title ?

And is there any settings for it? Don't see it either!


All times are GMT. The time now is 10:50 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.01359 seconds
  • Memory Usage 1,827KB
  • 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_php_printable
  • (16)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