Hi,
I'm trying to modify the plugin fox made called af_redditimgur.
I want the plugin to replace the [link] in reddit feeds with the URL. The problem I have run into is how to only identify the [link] and not all a tags in the post. I have tried using the $entry->getAttribute("text") and $entry->firstChild but none of them return any value.
Any ideas on how to identify the [link] anchor? Cheers
and thanks for a superb program Fox.
Modifying feeds plugin based on af_redditimgur
-
- Bear Rating Overlord
- Posts: 373
- Joined: 20 Aug 2013, 23:13
Re: Modifying feeds plugin based on af_redditimgur
I don't use this so I have no idea how the page is structured, but if you want the text in a tag that's a text node and accessible with the text() option in XPath. If you have the domnode object I think you can just do $entry->nodeValue.
Re: Modifying feeds plugin based on af_redditimgur
Cheers JustAMacUser. I got it working by googling a little more and looking at a link I had skipped earlier when I was coding.
The magic sauce was $entry->textContent
The magic sauce was $entry->textContent
Re: Modifying feeds plugin based on af_redditimgur
Apologies for the necrobump, but could you share your modifications? I was looking for something just like this, and this post was all that I could find.
Who is online
Users browsing this forum: No registered users and 1 guest