New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Or in more detail...
You'd want to pull the data from database, parse DOM, remove all matching A nodes, then reinject back into the database. Applying a regex to it... 50/50 shot of breaking your HTML structure especially if malformed.
@jbiloh, @FAT32
I'm extremely p_ssed off because
So, the situation is that a user asks for help, I can provide that help - based on concrete practical experience - and even a full "just copy and insert your variable" solution BUT I'M F_CKING BLOCKED from posting it.
Gentlemen, if CloudF%&#! nukes the very reason of existence of this forum it's about time to throw out the "protection" rather than asked for solutions and angry users.
@momkin
I'm sorry, I had a full - and known to work well - solution for you but I can't post it thanks to CloudF_ck and/or Vanilla being aggressively imbecile. I'd be willing to send it by PM but I'm virtually sure that won't work either. Sorry.
@jsg you could use some paste bin site for your solution and place a link to it
Thanks, what good is a forum for if I need to put my solution on another site? Making it hard for experienced user to share their experience and knowledge and to provide solutions and help is about the worst thing a forum can do.
And btw I've already jumped through quite a few loops to (try to) provide a solution.
@jsg there is a lot of ways to share your solution like https://pastebin.com/ or you could also answer my question in https://stackoverflow.com/questions/63019017/mysql-delete-text-starting-and-ending-with-specific-words
This way it will be helpful for others !
Thank you for your time and effort !
As you ask so constructively and nicely ...
No. What you want is highly likely a way to remove text that starts with '[HREF]="URL1"' or with '[HREF]="URL2"' and ends with '[End of HREF]' - or do you really want to delete all links?
I occasionally had to do something similar when moving and cleaning a WP blog. The way I chose was to
https://paste.gg/p/anonymous/66074d0273514d449fcdd170b752973b
(Note: link will expire after 24 hours)
@jsg regret the inconvenience. Cloud flare is not perfect and I know there are some frustrating oddities that occur.
Funny. I shared a known to work well solution incl. concrete how-to, changed my post multiple times to make it pass, and finally put it on some paste bin as suggested.
And not even a simple "thank you". Lesson learned, thank you.
you lost him at parameterized but latest at python or lua
do you think, if he would feel comfortable with that he would have asked his question in the first place? ;-)
i don't see any ( ready to go tutorial )
what i see is you asking me to do thing with other programming languages python or lua which far away what i'm seeking for .
Anyway thank you very much for your time and effort i really appreciate it .
Anyone got an easy way to do this ??
You have to use PHP & DOM. I wrote a function on the fly but this damned Cloudflare is driving me crazy! It keeps asking to complete a CAPTCHA I can't see! I've been forced to post the code on Github here:
https://github.com/Kian987/Random-Stuff/blob/master/Stuff/WordPress.php
I will remove it later. Anyway here's the before/after in database:
The only problem is that DOM keeps adding
<p></p>
tags even if I usedLIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD
. Well it's too late now. I have no time to explain. I wasted too much time because of CloudflareThanks mate how can i use this script exactly ?
I mean how can i link to my database to make the changes ?
I'm not using WordPress hence I created a wp_post table on the fly following this structure. What you need are:
That said, I've added comments to the original script so that you can get an idea of how it works. Of course you'll need to adapt it to your needs sinc as I said earlier I'm not using WordPress.
Hi ,
I'll try to make it work with WordPress , Thank you very much for your help !
What I would try is using WP-CLI as that is a reasonably safe / easy way to do DB replacements. I would:
1 Back up the database!
2 Instal WP-CLI and do the replace command
You can get WP-CLI from here https://wp-cli.org/
And an example on how to use the replace command - although not exactly what it is you want here, but is close:
https://webdock.io/en/docs/wordpress-guides/fixing-wordpress-redirect-issues
This can easy be done without wp cli i can do it without it , wp cli is useless , what i requested is more complicated !
This is usually the hint that you need a scripting language with batteries included. (for parsing markup.)
https://amasty.com/
So you signed up to necropost and spam?
No congrats on your first post