View Full Version : Example of using hook rssfeeddata_presave?
KW802
09-12-2010, 12:07 AM
With the current version of vB 3.8.x, is there an example out there of using the hook rssfeeddata_presave?
What I am trying to do is to modify the parsed description so that if starts with value X then to remove X from the description prior to the post being saved.
Thanks :o
I don't know of an example, but it looks like you could do something like:
$title = $this->fetch_field('title');
// Do your check, and if changed....
$this->set('title', $title);
assuming that "title" is the field you want, of course. I didn't see anything else that looked like a description, but if you look at the top of includes/class_dm_rssfeed.php there's a list of fields.
KW802
09-14-2010, 02:23 AM
kh99,
Thanks for the pointer. :) Guess this weekend I have to redo my plugin a bit to see where I'm going wrong.
Hmm..I'm not sure I understand, did you do it a different way or did my example not work? There may be other ways to make it work using that hook, and I didn't actually try my example. BTW it's in class_dm_rssfeed.php and you probably would also want to look at class_dm.php (but maybe you knew that already).
ETA: and now I notice that you've obviously been around a while and released a number of mods, so probably I just misunderstood your original question.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.