themaPoster
http://poster.themasoftware.com/forum/

Forum replacements problems.
http://poster.themasoftware.com/forum/viewtopic.php?f=4&t=634
Page 44 of 74

Author:  zaika [ September 2nd, 2018, 2:57 pm ]
Post subject:  Re: Forum replacements problems.

Freddy wrote:
zaika wrote:
Freddy wrote:
In "FORUMS" -> select needed forum -> There is an option to use "hide with url for links".

Make sure hosts are added as described: http://poster.freddy.lt/faq.php?expand=faq104


sorry me freddy but making this in all forum i will have that all links similar will be surrounded, but i want this action only for ONE forum, so please is possible make this action only in one forum using your help in REPLACEMENTS ?i need make this ONLY in one forum i cannot dot this for all.


That option is for specific forum only. You can set what ever you need for each forum.

If you set "hide with url" only for one forum it will be used only for that forum (it's forum specific setting for each forum).

For other forums set to "replace with nothing" or "use code" or use only "hide" or only "url".

You can set for each forum what you need.



For me is very difficult made this, because i have a lot of forum where they want CODE instead of LINKS and some other TAG, you will make me one big pleasure if you can help me creating for me comando for use in REPLACEMENTS as i requested in 1° topic here:

viewtopic.php?p=30426#p30426

please if you can suggest me it.

thx you so much

Author:  Freddy [ September 2nd, 2018, 3:31 pm ]
Post subject:  Re: Forum replacements problems.

That's why special setting was made in the first place.

If some forum wants "CODE" just choose option to surround with "CODE" automatically.

If some forum wants some other tag, just choose that option.

It's much easier to do then with replacements. That setting is specifically made for this.

Author:  zaika [ September 2nd, 2018, 8:02 pm ]
Post subject:  Re: Forum replacements problems.

Freddy wrote:
That's why special setting was made in the first place.

If some forum wants "CODE" just choose option to surround with "CODE" automatically.

If some forum wants some other tag, just choose that option.

It's much easier to do then with replacements. That setting is specifically made for this.


the problem is that ALREADY i use CODE for my links in PREFORM, i create article with links that ALREADY have CODE because i need them in this way, so my links are not without TAG when i create article them have already CODE. for this i have problem by the way if you cannot write me code for replacements its ok.

thx

Author:  Freddy [ September 3rd, 2018, 6:16 pm ]
Post subject:  Re: Forum replacements problems.

@zaika You would need to add two replacements (one to add url tags, another for hide).

Search for:
Code:
https?://(www\.)?(keeplinks|filecrypt).+


Replace with:
Code:
[url=$0]$0[/url]


Enable regex.

Search for:
Code:
(?s)(.+\n)(.+?keeplinks.+?filecrypt.+?)(\n|$)


Replace with:
Code:
$1[hide]$2[/hide]$3


Enable regex.

Author:  zaika [ September 3rd, 2018, 8:41 pm ]
Post subject:  Re: Forum replacements problems.

Thank you so much Freddy i will try :)

Author:  zaika [ September 3rd, 2018, 9:45 pm ]
Post subject:  Re: Forum replacements problems.

Done but create me links in this way:

https://filecrypt.cc/Container/D46A30878E.html
https://www.keeplinks.co/p95/5b8d99d03ebfe

The Part in BOLD is ACTIVE as if there is URL, other part NO ACTIVE as WITHOUT URL

1° There isn't TAG HIDE
2° Link are ACTIVE with URL till the point
Example:-> https://filecrypt. and https://www.keeplinks.

All other part of URL are not active, seems as the url is divided in 2 part one BEFORE the POINT the other AFTER the POINT.

Author:  Freddy [ September 4th, 2018, 5:01 am ]
Post subject:  Re: Forum replacements problems.

I just forgot to copy "+" at the end for first url replacement (fixed above as well).

Search for:
Code:
https?://(www\.)?(keeplinks|filecrypt).+


Replace with:
Code:
[url=$0]$0[/url]


Enable regex.


For hide, your first example was different (viewtopic.php?p=30426#p30426). The links were in different order.

I wrote the replacement for first example where first link is keeplinks and second link is filecrypt.

If you changed the order of your links now just make changes to replacement and replace the order.

Search for:
Code:
(?s)(.+\n)(.+?filecrypt.+?keeplinks.+?)(\n|$)


Replace with:
Code:
$1[hide]$2[/hide]$3


Enable regex.

Author:  zaika [ September 11th, 2018, 1:54 pm ]
Post subject:  Re: Forum replacements problems.

Freddy wrote:
I just forgot to copy "+" at the end for first url replacement (fixed above as well).

Search for:
Code:
https?://(www\.)?(keeplinks|filecrypt).+


Replace with:
Code:
[url=$0]$0[/url]


Enable regex.


For hide, your first example was different (viewtopic.php?p=30426#p30426). The links were in different order.

I wrote the replacement for first example where first link is keeplinks and second link is filecrypt.

If you changed the order of your links now just make changes to replacement and replace the order.

Search for:
Code:
(?s)(.+\n)(.+?filecrypt.+?keeplinks.+?)(\n|$)


Replace with:
Code:
$1[hide]$2[/hide]$3


Enable regex.



Thx Freddy for your help but i forgot to tell you that in first part the links have TAG CODE, i use it because require in all other forum so correct version is this:

After
Code:
[code]https://www.keeplinks.co/p95/5b81b9854368e[/code]

[code]https://filecrypt.cc/Container/31306764FA.html[/code]


Before
Code:
[hide]
[url=https://www.keeplinks.co/p95/5b81b9854368e]https://www.keeplinks.co/p95/5b81b9854368e[/url]

[url=https://filecrypt.cc/Container/31306764FA.html]https://filecrypt.cc/Container/31306764FA.html[/url]
[/hide]


if you prefer this BEFORE too is same for me:

Before
Code:

[hide][url=https://www.keeplinks.co/p95/5b81b9854368e]https://www.keeplinks.co/p95/5b81b9854368e[/url][/hide]

[hide][url=https://filecrypt.cc/Container/31306764FA.html]https://filecrypt.cc/Container/31306764FA.html[/url][/hide]



the only thing i was missing was the TAG CODE that i have around links

Author:  Freddy [ September 11th, 2018, 6:42 pm ]
Post subject:  Re: Forum replacements problems.

If that's the only place where you have code tags just add simple replacement (not regex) to remove them (don't copy from below, I added extra spaces so that forum would show it normally).

Add them before adding those other two.

Search for (without any spaces):
Code:
[ code ]


Replace with:
Code:
(leave empty)


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

Search for (without any spaces):
Code:
[/ code ]


Replace with:
Code:
(leave empty)

Author:  Crackpot [ October 9th, 2018, 3:52 pm ]
Post subject:  Re: Forum replacements problems.

how can we remove last line of the template.

Author:  Freddy [ October 9th, 2018, 4:07 pm ]
Post subject:  Re: Forum replacements problems.

You can remove last message line with replacement:

Search for:
Code:
\n.+$


Replace with:
Code:
(leave empty)


Enable regex.

Author:  paradajz [ October 9th, 2018, 8:45 pm ]
Post subject:  Re: Forum replacements problems.

How to find and replace only first occurence in message?

Example:

before

Quote:


after

Quote:

Author:  Freddy [ October 10th, 2018, 6:10 pm ]
Post subject:  Re: Forum replacements problems.

Search for:
Code:
(?is)https?://nitroflare.+


Replace with:
Code:
Download Nifroflare\n$0


Enable regex.

Author:  ad-team [ October 10th, 2018, 6:33 pm ]
Post subject:  Re: Forum replacements problems.

hi bro ,some site limit character in title for example 80 character ,if post contains title more then 80 post failed ,
thanks

Author:  Freddy [ October 10th, 2018, 6:58 pm ]
Post subject:  Re: Forum replacements problems.

You can change subject characters limit setting in "CONFIG" -> "General posting" -> to 80.

Or if you want to limit it only for specific forum you can add replacement in "Subject" replacements for needed forum.

Search for:
Code:
^([^\n]{80}).+$


Replace with:
Code:
$1


Enable regex.

Page 44 of 74 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/