vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - [OzzModz] URL Icon Before Or After Links In Posts (https://vborg.vbsupport.ru/showthread.php?t=314177)

ozzy47 09-07-2014 10:00 PM

[OzzModz] URL Icon Before Or After Links In Posts
 
Another mod brought to you by,
https://vborg.vbsupport.ru/external/2015/01/1.png

This is a modification that will will add a url icon before or after every link in your posts. It will also allow you to have different images for internal and external links. You can also set different colors for the links, instead of the default link color.

It is a simple installation, upload the file in the UPLOAD folder, then import the product XML, product-ozzmodz_url_icon

You can edit the options under the settings, [OzzModz] URL Icon Before Or After Links In Posts Settings
You can change the stylevars in each style found under the group OzzModz. Their is thirteen of them and all start with ozzmodz_url_icon_

Complete Feature List
  • Option to disable the mod completely.
  • Option to display the image before or after the links.
  • Option to show different icons for internal and external links.
  • Option to set a url whitelist, that will be treated as internal links.
Complete Stylevar List
  • ozzmodz_url_icon_images This is used if you are not displaying different images for internal/external links.
  • ozzmodz_url_icon_images_color Color for links. This is used if you are not displaying different images for internal/external links.
  • ozzmodz_url_icon_images_hover_color Hover color for links. This is used if you are not displaying different images for internal/external links
  • ozzmodz_url_icon_images_ext This is used if you are displaying different images for internal/external links, this is for the external link.
  • ozzmodz_url_icon_images_ext_color Color for external links. This is used if you are displaying different images for internal/external links.
  • ozzmodz_url_icon_images_ext_hover_color Hover color for external links. This is used if you are displaying different images for internal/external links.
  • ozzmodz_url_icon_images_int This is used if you are displaying different images for internal/external links, this is for the internal link.
  • ozzmodz_url_icon_images_int_color Color for internal links. This is used if you are displaying different images for internal/external links.
  • ozzmodz_url_icon_images_int_hover_color Hover color for internal links. This is used if you are displaying different images for internal/external links.
  • ozzmodz_url_icon_left_image_margin This is the amount of space inbetween the image and the preceding text, when it is to the left of the links.
  • ozzmodz_url_icon_left_image_padding This is the amount of space inbetween the image and the link, when it is to the left of the links.
  • ozzmodz_url_icon_right_image_margin This is the amount of space inbetween the image and the following text, when it is to the right of the links.
  • ozzmodz_url_icon_right_image_padding This is the amount of space inbetween the link and the image, when it is to the right of the links.
Frequently Asked Questions.

Q. How do I upgrade from version 1.x.x to version 2.0.0?

A. Same as installing the mod for the first time. Upload the file in the UPLOAD folder, then import the product XML, product-ozzmodz_url_icon.

Q. Why do I need such a thing, you ask?

A. Some admins might like to have this as it makes it easier for users to identify links in the posts.

Q. How do I change the image(s)?

A. This can be done by editing the stylevars, ozzmodz_url_icon_images, ozzmodz_url_icon_images_ext and ozzmodz_url_icon_images_int found under the group OzzModz in each of your styles.

Q. How do I change the space around the image(s)?

A. This can be done by editing the stylevars, ozzmodz_url_icon_left_image_margin, ozzmodz_url_icon_left_image_padding, ozzmodz_url_icon_right_image_margin and ozzmodz_url_icon_right_image_padding found under the group OzzModz in each of your styles.

Q. How do I change the link color(s)?

A. This can be done by editing the stylevars, ozzmodz_url_icon_images_color, ozzmodz_url_icon_images_hover_color, ozzmodz_url_icon_images_ext_color, ozzmodz_url_icon_images_ext_hover_color, ozzmodz_url_icon_images_int_color and ozzmodz_url_icon_images_int_hover_color found under the group OzzModz in each of your styles.


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

If you like this mod please hit the https://vborg.vbsupport.ru/external/2015/08/1.png button to the right ---->

Please remember to click the, https://vborg.vbsupport.ru/external/2015/08/2.png button to the right if you installed the mod ---->

What does 'Marking As Installed' do ?

* It helps you to stay on top of updates - members who have installed modifications will be notified whenever new updates are available.

* For security issues - vbulletin.org will contact all members who have installed a modification whenever a security issue is brought to their attention.

* Marking a modification as installed also helps me know how many people are using my work, giving me extra incentive to provide more features and new modifications.

I appreciate the support!
-------------------------------------------------------------------------------------------

* History (Changelog) *
-------------------------
v1.0.0 (September 7, 2014)
- Initial public release.

v1.0.1 (September 8, 2014)
- Now it is compatible with the old style postbit.

v1.1.0 (September 11, 2014)
- Deleted the image setting, and made it a stylevar, so you can have different images for each style.

v2.0.0 (October 5, 2014)
- Added ability to have different images for internal/external links.
- Added a url whitelist, that will be treated as internal links.
- Image(s) will no longer show next to the quoted by link in post quotes.
- Images will no longer show up in the attachments box.
- Images will no longer show next to the email links.
- Images will no longer show up next to inline images.
- Added additional stylevars to control the new images, and the padding and margin.
- Added stylevars to set colors for the links.
- Added code to tell the difference between internal/external links.
- Added two more CSS templates, for use with the internal/external images.

v2.0.1 (October 7, 2014)
- Fixed a issue with the CSS not showing in v2.0.0

v2.0.2 (December 3, 2014)
- Added a fix for a potential minor XSS exploit. There was no one that reported this, this is just a update to make sure the mod is fully secure.

ozzy47 09-07-2014 11:34 PM

Reserved.

ozzy47 09-08-2014 06:17 PM

Updated the zip, as it was missing the XML. :confused:

IceFanatic 09-09-2014 01:08 AM

Doesn't seem to work for me. 4.2.2

ozzy47 09-09-2014 01:15 AM

Quote:

Originally Posted by IceFanatic (Post 2514298)
Doesn't seem to work for me. 4.2.2

Care to send me a admin account so I can check it out?

ozzy47 09-09-2014 02:19 AM

OK the issue has been fixed. :)

ozzy47 09-09-2014 02:19 AM

v1.0.1 (September 8, 2014)
- Now it is compatible with the old style postbit.

To upgrade, import the XML, allowing overwrite.

IceFanatic 09-09-2014 02:26 AM

Beautiful, it works!

ozzy47 09-09-2014 02:28 AM

Excellent, glad to hear. Thanks for the access so I could see what was going on.

Thanks for marking as installed. :)

New Joe 09-09-2014 03:36 AM

Well, i spent a long time trying to find the css template edit mod which I've used in the past, found it and used it.
Then you come out with this easy mod which could have saved me a lot of time..lol.
Oh well, at least now I know for the future there is this one here.
Cheers Ozzy

Krusty1231 09-09-2014 09:34 AM

Will this add the icon to existing threads?

ozzy47 09-09-2014 09:35 AM

Yes sir, it will add it to all posts that have URL's in them. :)

ozzy47 09-09-2014 09:35 AM

Quote:

Originally Posted by New Joe (Post 2514315)
Well, i spent a long time trying to find the css template edit mod which I've used in the past, found it and used it.
Then you come out with this easy mod which could have saved me a lot of time..lol.
Oh well, at least now I know for the future there is this one here.
Cheers Ozzy

Why not undo your change, and install this one? :p

bzcomputers 09-09-2014 10:07 AM

Can't seem to get a custom image to show.

Image is placed in your specified directory and name is changed in settings, but default image still shows.

ozzy47 09-09-2014 10:15 AM

I'll look into it later today when I get home from work. Don't forget to mark as installed. :)

RichieBoy67 09-09-2014 02:45 PM

Quote:

Originally Posted by bzcomputers (Post 2514361)
Can't seem to get a custom image to show.

Image is placed in your specified directory and name is changed in settings, but default image still shows.

Did you clear your cache and is the image the same size?

Charis 09-09-2014 03:16 PM

Thank You "Mod Machine".:)

Very nice and useful indeed.:up:

It would be great if we had the ability to disable it and don't show it before/after [email] and attachments.

Nirjonadda 09-09-2014 03:44 PM

Does it work with [ CODE ][ /CODE ] Tag ?

ozzy47 09-09-2014 03:59 PM

Quote:

Originally Posted by Nirjonadda (Post 2514403)
Does it work with [ CODE ][ /CODE ] Tag ?

Nope, as that is not a live link. :)

bzcomputers 09-09-2014 05:50 PM

Quote:

Originally Posted by RichieBoy67 (Post 2514393)
Did you clear your cache and is the image the same size?

Yes and Yes.

https://vborg.vbsupport.ru/external/2014/09/20.png

ozzy47 09-09-2014 07:17 PM

I have a idea what might be going on. I think instead of having the image in a vBoption, I need to do it as a stylevar. I'll test it out later tonight, and if it works, I'll update the mod.

It might actually be better this way, then you can have different images for each style. :)

ozzy47 09-11-2014 09:26 AM

I'll try and get the update out today, it works pretty good as a stylevar. :)

ozzy47 09-11-2014 08:49 PM

v1.1.0 (September 11, 2014)
- Deleted the image setting, and made it a stylevar, so you can have different images for each style.

Marcin1 09-12-2014 01:54 AM

Before the update was added mod was displayed in thread. Now an image is blank :(

ozzy47 09-12-2014 01:56 AM

Did you check the stylvars and make sure the image is set, it should be url.png

Marcin1 09-12-2014 02:19 AM

It's working now! Sorry I missed that step.

ozzy47 09-12-2014 02:23 AM

TBH it should have set that on install, but for some reason sometimes the stylevars don't get set when you import the mod.

ozzy47 09-12-2014 09:34 AM

I think I found the issue with the stylevar, it's been fixed in the zip file. :)

bzcomputers 09-12-2014 12:13 PM

Latest version fixed my issues, custom images work fine now, thanks.

Couple of recommendations for future releases:
1) Add the padding-left/right option to the stylevar
2) Add a margin-left/right option and put it in the stylevar
3) Add the ability to use different icons based on whether the link leaves the site (changes domain) or is an internal link.

OUTL4W 09-12-2014 01:19 PM

would it be possible to pull in the favicon from the url?...if not that's ok...

ozzy47 09-12-2014 07:54 PM

Quote:

Originally Posted by bzcomputers (Post 2514836)
Latest version fixed my issues, custom images work fine now, thanks.

Couple of recommendations for future releases:
1) Add the padding-left/right option to the stylevar
2) Add a margin-left/right option and put it in the stylevar
3) Add the ability to use different icons based on whether the link leaves the site (changes domain) or is an internal link.

Those seem possible. :)

ozzy47 09-12-2014 07:57 PM

Quote:

Originally Posted by OUTL4W (Post 2514846)
would it be possible to pull in the favicon from the url?...if not that's ok...

Just add the favicon to the ozzmodz_mods/ozzmodz_url_icon/images folder, then in the stylevar use, favicon.ico

bzcomputers 09-15-2014 02:40 AM

Anyway to stop this from adding icon to quoted message "posted by" link:

https://vborg.vbsupport.ru/external/2014/09/6.jpg

...possibly skipping anything referencing class="bbcode_postedby". Actually, it might be better overall if it just didn't add the icon to any link referenced by an <img>.

ozzy47 09-15-2014 09:35 AM

I am going to have to do some studying on how to stop it from showing on everything.

bzcomputers 09-15-2014 03:07 PM

Quote:

Originally Posted by ozzy47 (Post 2515231)
I am going to have to do some studying on how to stop it from showing on everything.

Yeah, that may be a pain to figure out.

In the mean time I added this to fix the post quote issue (also had to remove the "!important" reference on the background from the original css):

Code:

.bbcode_postedby a {
        background: none !important;
        padding-left: 0 !important;
}


ozzy47 09-15-2014 05:12 PM

That's a interesting workaround, and probably the easiest way to do it. :)

ozzy47 10-05-2014 03:03 PM

v2.0.0 (October 5, 2014)
- Added ability to have different images for internal/external links.
- Added a url whitelist, that will be treated as internal links.
- Image(s) will no longer show next to the quoted by link in post quotes.
- Images will no longer show up in the attachments box.
- Images will no longer show next to the email links.
- Images will no longer show up next to inline images.
- Added additional stylevars to control the new images, and the padding and margin.
- Added stylevars to set colors for the links.
- Added code to tell the difference between internal/external links.
- Added two more CSS templates, for use with the internal/external images.

mitch84 10-05-2014 03:26 PM

hi, I don't understand, how add a different image for a specific domain?
ex:
vbulletin.org=> image a
vbulletin.com=>image b
thx

ozzy47 10-05-2014 03:27 PM

That is not possible, only different images for internal/external images.

mitch84 10-05-2014 04:47 PM

ok, not for me, uninstalled


All times are GMT. The time now is 03:25 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.02997 seconds
  • Memory Usage 1,828KB
  • 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
  • (1)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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