You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Putting this up for discussion here. What I would like to see added is for the theme.php file to be able to hook into the saving logic used. This way a theme can add extra form fields and save them to the RSS.
For instance, a theme author could add an email field to the new thread / reply form and then implement a way for this to be saved. A possible solution for threads could be to call a function between $rss->set() and file_put_contents that can be used much like the theme_custom function.
This could allow for something like this to be added to the theme.php file:
functionnew_thread_custom($rss) {
if ( isset($_POST['email']) && !empty($_POST['email']) ) {
$rss->setValue(
// Create a valid RSS `author` field:'/rss/channel/item/author' => $_POST['email'] . '(' . NAME . ')'
);
}
}
Of course this is the easiest of examples. But even this offers several new possibilities to a theme author. It’s now easier to display Gravatars or to contact a poster if we are talking an intranet board
Something bigger could be people allowing for images to be uploaded and adding enclosure elements to publish these.
This will mean the theme author should be able to hook into the reading of the RSS file aswell, but I think that’s what issue #155 is for.
The text was updated successfully, but these errors were encountered:
Very interesting; had not thought about this at all.
I have been considering for a long time to unify saving through a single function that takes a SimpleXML object and outputs it. This way, it would be easy for a hook function to modify the SimpleXML object prior to it being written out.
Putting this up for discussion here. What I would like to see added is for the theme.php file to be able to hook into the saving logic used. This way a theme can add extra form fields and save them to the RSS.
For instance, a theme author could add an email field to the new thread / reply form and then implement a way for this to be saved. A possible solution for threads could be to call a function between
$rss->set()
andfile_put_contents
that can be used much like thetheme_custom
function.This could allow for something like this to be added to the theme.php file:
Of course this is the easiest of examples. But even this offers several new possibilities to a theme author. It’s now easier to display Gravatars or to contact a poster if we are talking an intranet board
Something bigger could be people allowing for images to be uploaded and adding
enclosure
elements to publish these.This will mean the theme author should be able to hook into the reading of the RSS file aswell, but I think that’s what issue #155 is for.
The text was updated successfully, but these errors were encountered: