May 4, 2011

Remove specific content on import. | CyberSEO Pro | Support Forum

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Remove specific content on import.
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
January 11, 2021
1:11 pm
Avatar
inTempoDK
Member
Members
Forum Posts: 6
Member Since:
January 10, 2021
sp_UserOfflineSmall Offline

Hi, i will try write again, been writing this question 3 times now since some plugin blocks me for posting, i will add the code in a jpg file.

We talked on chat about this question and you told me to post on forum for show me how to do

The text in this jpg, i want to remove several places, the class is "Embed Article", but all the text before this class and after i still need to import from the fetched page so its this intire block (content of the inside of the block can change).

Login to see this link

You said something about doing it in PHP?

Also i see some things missing on import from the original article, im guessing to add class specific content works the same way? small example maybe on include some specific classes? :)

Overall impressed with this plugin, alot better then the other one i had with bugs :)

Thanks :)

January 11, 2021
4:47 pm
Avatar
CyberSEO
Admin
Forum Posts: 3913
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

In general your code (the one you should copy/paste into the "PHP code " box on the "Advanced" tab of the feed settings) will look like this:

Login to see the code

You just need to replace the BEGINNING and ENDING dummy keywords with actual parts of your HTML file. So in your case the following code will do the trick:

Login to see the code

Every time when you want to replace some parts of text by means of PHP, you need to use the Login to see this link function. I would recommend you to read the documentation article on it. There are many real-life examples that you may find useful. Feel free to play with that function in your PHP settings and don't worry to make mistakes - they won't kill your sitewink, but you will get a great experience with a content manipulation.

January 11, 2021
11:42 pm
Avatar
inTempoDK
Member
Members
Forum Posts: 6
Member Since:
January 10, 2021
sp_UserOfflineSmall Offline

Ok i just tried another code, can see whats wrong?

this is what i want to remove:

Login to see the code

 

using your excample i made this

Login to see the code

 

But that only remove the code in the above PHP code, not the intire thing, i forgot something?

January 11, 2021
11:58 pm
Avatar
inTempoDK
Member
Members
Forum Posts: 6
Member Since:
January 10, 2021
sp_UserOfflineSmall Offline

So just to say, it does remove the data i wrote in it, but not the stuff in between, it leaves this in the post

Login to see the code

January 11, 2021
11:58 pm
Avatar
CyberSEO
Admin
Forum Posts: 3913
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Here is the correct code:

Login to see the code

Your source post has a "|" symbol which must be escaped.

Here is a full list of the symbols to escape:

\ ^ . $ | ( ) [ ] * + ? { } ,

So there must be "\[1..3\]" instead or "[1..3]", "\$14.95" instead of "$14.95", "a\|b" instead of "a|b" etc.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 541

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 84

s.baryshev.aoasp: 68

Freedom: 61

Pandermos: 54

MediFormatica: 49

B8europe: 48

Member Stats:

Guest Posters: 337

Members: 2817

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1627

Posts: 8280

Newest Members:

igor.buzaev, jeremyboucher, lthompson2709, MAC, duty3canada, backlinkmorocco

Administrators: CyberSEO: 3913