inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 14, 2016 10:19:40 GMT -8
Hi Barkley I'm not seeing the name being viewed as two separate words. The code replaces the match with whatever you want. So if you want "John" replaced it would find the word "John" regardless of his or her second name. It might replace it with an image, leaving the word "Green" untouched. If you want it to find the match "John Green" it could too, replacing both words with whatever you want. For example: John Smith
Smith
blacksmith
John Doe Given the above. I want to change "John Smith" and so only the top one is altered as that contains the match. If I wanted to change "John" then it would change both words in the top and bottom line. Selecting the "word only" option would prevent it from checking partial words, like the text in that link (in the image). If you want it to only select anchors then appending " a" (note: the space) after ".widget-content, .message" in the advanced tab, so it looks like ".widget-content a, .message a" would only select anchors. There is an option to specify case, so you're golden Is there something you can do about the links please bud? Does my suggestion above not work?
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 14, 2016 10:32:26 GMT -8
Is there something you can do about the links please bud? Does my suggestion above not work? I think hes confused on the process in which would fix his problem
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 14, 2016 12:31:47 GMT -8
Ah right. This should do it.
Select the "word only" option for each entry, then in the advanced tab change it to ".widget-content a, .message a" (without the quotes) so it only selects anchors.
|
|
inherit
187402
0
Mar 23, 2016 19:15:19 GMT -8
Barkley
1,591
December 2012
avinalaff
|
Post by Barkley on Apr 14, 2016 20:34:33 GMT -8
Does my suggestion above not work? I think hes confused on the process in which would fix his problem Ah right. This should do it. Select the "word only" option for each entry, then in the advanced tab change it to ".widget-content a, .message a" (without the quotes) so it only selects anchors. Cheers lads, I'll give it a whirl. Tired at the mo and info isn't sinking in.
|
|
inherit
187402
0
Mar 23, 2016 19:15:19 GMT -8
Barkley
1,591
December 2012
avinalaff
|
Post by Barkley on Apr 18, 2016 10:18:21 GMT -8
Quozzo I did what you advised and unfortunately it doesn't work. I wrote the following in the advanced .widget-content a, .message a The hyperlinks 'STOPPED' working, and the image still affected the url. This is the information entered: This is the result: Note the word Joel Robles has not turned into a hyperlink. Can I ask if you are getting a different result on your test forum? Many thanks. PS. I'd be very happy to 'not' have the html and image features, if it meant a working Hyperlink plugin, as I'm only in need of the hyperlink, and the others appear to be problematic.
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 18, 2016 12:44:25 GMT -8
I'm only seeing it replace the text. It doesn't prevent the link from working unless I make an entry that creates a link when it matches quozzo, effectively creating a link inside a link. I've fixed that issue, it no longer creates a link inside of a link. I'm assuming you're switching it to an image though, so I can literally see what is happening as you only want specific words turned into links? If you want it to change the entire text node with the match, so if you want a link that only says "quozzo" and nothing else, then placing a ^ at the beginning and $ at the end of the "Find text" field will ensure that the whole line must only contain that match. ^Quozzo$support.proboards.com/post/6563215/thread
|
|
inherit
187402
0
Mar 23, 2016 19:15:19 GMT -8
Barkley
1,591
December 2012
avinalaff
|
Post by Barkley on Apr 18, 2016 23:16:19 GMT -8
I'm only seeing it replace the text. It doesn't prevent the link from working unless I make an entry that creates a link when it matches quozzo, effectively creating a link inside a link. I've fixed that issue, it no longer creates a link inside of a link. I'm assuming you're switching it to an image though, so I can literally see what is happening as you only want specific words turned into links? If you want it to change the entire text node with the match, so if you want a link that only says "quozzo" and nothing else, then placing a ^ at the beginning and $ at the end of the "Find text" field will ensure that the whole line must only contain that match. ^Quozzo$support.proboards.com/post/6563215/threadHi matey. What I want is for the words in an article, or sentence, to remain 'as intended' but for any reference to a player, or manager / coaches name etc, to become a hyperlink, that takes the person to that specific profile page should they choose to press on it. Example : "In yesterday's game, midfielder Steven Pienaar had a cup of tea and a biscuit". (that is all I need it to do) I used the image to show that the image option was changing the url, and hadn't considered the link inside a link until you mentioned it. I'm a bit thick though, so was hoping the plugin might be just a case of adding the 'name' followed by the 'url' to create the hyperlink, and the word match etc might be default. I'll check it out again. Many thanks.
|
|
inherit
187402
0
Mar 23, 2016 19:15:19 GMT -8
Barkley
1,591
December 2012
avinalaff
|
Post by Barkley on Apr 19, 2016 11:44:40 GMT -8
Quozzo I tested version 1.44 and it appears to be working very well so thank you very much. The image problem in the url stopped once wrapped with the ^ and $ as you suggested. I appreciate your efforts. Can I possibly make a suggestion ?If the image option is causing issues, then rather than find workarounds, such as ^ and $ etc, maybe don't have it? 1. Remove image and maybe even html option2. Remove option for exact word and instead have it exact word only by deafult in the plugin code3. Replace option for exact word with option to have _blank or _self
I always worry I'm coming across as rude every time I make a suggestion, but I think the simpler the plugin, the better it it will be, and the easier it will be to get it to work with v6. I personally don't have need for turning a word into an image on a mass scale. It's clever, but equivalent to installing a car cigarette lighter when the driver doesn't smoke, and it becomes an unnecessary gadget. At the same time, the HTML function is only useful if it changes the colour or size of the hyperlink, (it doesn't) so maybe remove that as well? Then we don't have to worry about making them work. Other people might find those features useful, but to them, I say "request their own plugin" ha ha. The more basic it is, and specific to hyperlinks, the better it will be. This would also cut out the need for "Type" so you could have the following: I hope that comes across as constructive, and not critical.
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 19, 2016 13:22:46 GMT -8
Hi Barkley I'm just confused why text inside a link would be causing an issue since the request was to turned words into a link, not the other way around. All of the options work exactly the same. Removing one won't affect the plugin. They're essentially pre-determined Custom HTML options for anyone lacking the knowledge, which brings me to item number 3 on your list. If you want a link with either _blank or _self then instead of using the Link options, you could use the Custom HTML option that converts it into a link. ProBoards v6 won't affect this plugin much. Only the selector targeting the posts which is one line. If I thought it drastically change then I wouldn't have updated the code. I do like the cigarette lighter analogy because hardly anyone smokes anymore (it's even illegal to smoke in a car with children in the UK) but that seemingly useless gadget is now used by billions to charge their satnav and/or phone. Its great to see how people use plugins given a little flexibility. I am astonished though that people request options to be taken out, even when they have the option not to use it. I will never understand that. You insist that you won't need the HTML option, but that could be used to create links with _self or _blank and discussed above, and change the colour, boldness, anything. How? If you won't use the other options, they're just that, optional. Removing them won't make Links any better. They even give you more link options that you wanted. I think it's a lack of understanding how this plugin works. It uses RegExp which is powerful stuff. Instead of needing to create a line for each player that you want linked, you can create just one. The $1 in the Custom HTML (and other options) will be replaced with the text that is matched, so for example you might want to link Barkley and Quozzo to their own pages. You can do that by using this: Barkley|Quozzo The $1 symbol with then be replaced by whichever word it matches. <a style='color: yellow;' href='www.proboards.com/pages/$1' target='_blank'>$1</a> you also might want to replace every linked image with that image. It won't be possible to make an entry each time so you can do it simply with this: [\w\/\.-]+(?:jpg|png|bmp) and then http://$1 in the image option. The possibilities are endless!* *not really, but you get the idea.
|
|
inherit
187402
0
Mar 23, 2016 19:15:19 GMT -8
Barkley
1,591
December 2012
avinalaff
|
Post by Barkley on Apr 19, 2016 14:17:02 GMT -8
Hi Barkley I'm just confused why text inside a link would be causing an issue since the request was to turned words into a link, not the other way around. All of the options work exactly the same. Removing one won't affect the plugin. They're essentially pre-determined Custom HTML options for anyone lacking the knowledge, which brings me to item number 3 on your list. If you want a link with either _blank or _self then instead of using the Link options, you could use the Custom HTML option that converts it into a link. ProBoards v6 won't affect this plugin much. Only the selector targeting the posts which is one line. If I thought it drastically change then I wouldn't have updated the code. I do like the cigarette lighter analogy because hardly anyone smokes anymore (it's even illegal to smoke in a car with children in the UK) but that seemingly useless gadget is now used by billions to charge their satnav and/or phone. Its great to see how people use plugins given a little flexibility. I am astonished though that people request options to be taken out, even when they have the option not to use it. I will never understand that. You insist that you won't need the HTML option, but that could be used to create links with _self or _blank and discussed above, and change the colour, boldness, anything. How? If you won't use the other options, they're just that, optional. Removing them won't make Links any better. They even give you more link options that you wanted. I think it's a lack of understanding how this plugin works. It uses RegExp which is powerful stuff. Instead of needing to create a line for each player that you want linked, you can create just one. The $1 in the Custom HTML (and other options) will be replaced with the text that is matched, so for example you might want to link Barkley and Quozzo to their own pages. You can do that by using this: Barkley|Quozzo The $1 symbol with then be replaced by whichever word it matches. <a style='color: yellow;' href='www.proboards.com/pages/$1' target='_blank'>$1</a> you also might want to replace every linked image with that image. It won't be possible to make an entry each time so you can do it simply with this: .+(?:jpg|png|bmp) and then http://$1 in the image option. The possibilities are endless!* *not really, but you get the idea. I'm feeling a few defensive vibes so maybe we're not on the same wavelength. I requested you take stuff out because I felt that those things were getting in the way of it working properly and didn't want to trouble you further. Clearly I don't have enough working knowledge of coding to understand what you understand, and so can only report back what I find, and make a suggestion based upon good intent. I'll not ask you to keep changing it and appreciate your time and effort so thank you. I've decided to close at the end of the season, and so appreciate your time and effort.
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 19, 2016 16:02:32 GMT -8
I was just curious why you were saying it breaks links, if you wanted text to be converted into a link. If you only wanted it to match words (not links) then placing the ^ and $ symbols to fix the links would cause it to fail at matching text which is what you wanted in the first place. Example : "In yesterday's game, midfielder Steven Pienaar had a cup of tea and a biscuit". (that is all I need it to do) It will work for what you want it to, but I like to push myself and see what else is possible, usually these requests get my creative juices flowing so I like to create a plugin which also fulfils the request that gave me the idea. Funnily enough the first plugin I made for PB was an auto acronym inserter, which is what I based this on originally (and why I took up the request). But with the bugs and extra options the coding looks very different and could actually replace the automatic acronyms plugin. Another use for it At the end of the day I enjoyed creating this plugin otherwise I wouldn't have started. Hopefully you can find some use out of it before the end of the season, whenever that is. (I may be from Liverpool but I don't follow football )
|
|
inherit
187402
0
Mar 23, 2016 19:15:19 GMT -8
Barkley
1,591
December 2012
avinalaff
|
Post by Barkley on Apr 20, 2016 10:10:16 GMT -8
I was just curious why you were saying it breaks links, if you wanted text to be converted into a link. If you only wanted it to match words (not links) then placing the ^ and $ symbols to fix the links would cause it to fail at matching text which is what you wanted in the first place. Example : "In yesterday's game, midfielder Steven Pienaar had a cup of tea and a biscuit". (that is all I need it to do) It will work for what you want it to, but I like to push myself and see what else is possible, usually these requests get my creative juices flowing so I like to create a plugin which also fulfils the request that gave me the idea. Funnily enough the first plugin I made for PB was an auto acronym inserter, which is what I based this on originally (and why I took up the request). But with the bugs and extra options the coding looks very different and could actually replace the automatic acronyms plugin. Another use for it At the end of the day I enjoyed creating this plugin otherwise I wouldn't have started. Hopefully you can find some use out of it before the end of the season, whenever that is. (I may be from Liverpool but I don't follow football ) The help has my respect mate, too many people leave everything to others in life, so it's good to have guys like you sharing your skills. Season wise, it's end of May. Our manager has driven fans to despair and they've lost interest in it all, so the forum has been struggling badly recently despite PB telling us our figures are high. Maybe if a new manager happens it will help. I was waiting for v6, but it seems to be taking an eternity when our competitors have been fully responsive for a very long time already, and given 75% at least of visitors are mobile browsers it's a big issue. I might try opening it up to visitors as a last gasp, but will see what happens over the next 6 weeks.
|
|
inherit
187402
0
Mar 23, 2016 19:15:19 GMT -8
Barkley
1,591
December 2012
avinalaff
|
Post by Barkley on Apr 21, 2016 12:14:21 GMT -8
QuozzoHi mate. I tested it it out on my main forum, and have discovered another problem if you can possibly address it: It is effecting text and headers <h2><h3> etc on custom pages. Is it possible to tell it to only change things in threads / posts please? Many thanks.
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 21, 2016 12:18:01 GMT -8
Just remove the .widget-content a and the comma from the Selector field in the advanced tab.
|
|
inherit
187402
0
Mar 23, 2016 19:15:19 GMT -8
Barkley
1,591
December 2012
avinalaff
|
Post by Barkley on Apr 21, 2016 12:39:32 GMT -8
Just remove the .widget-content a and the comma from the Selector field in the advanced tab. Thanks, I'll try that.
|
|