Creating and modifying plugins.
jerwarren
Regular
Posts: 42 Joined: Fri Feb 10, 2006 8:55 pm
Post
by jerwarren » Sat Sep 23, 2006 8:34 am
I've been working on some extreme template customization, and I'm using the Sidebar Entries plugin. I've been tearing my hair out trying to figure out why $entry.is_entry_owner isn't working as expected, and just figured out that the plugin isn't setting up that variable the same way that serendipity does on its own.
I just copy/pasted this:
Code: Select all
if ($_SESSION['serendipityAuthedUser'] === true && ($_SESSION['serendipityAuthorid'] == $entry['authorid'] || serendipity_checkPermission('adminEntriesMaintainOthers'))) {
$entry['is_entry_owner'] = true;
}
into the plugin and it's all good now.
judebert
Regular
Posts: 2478 Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:
Post
by judebert » Sat Sep 23, 2006 3:20 pm
Where did you put it? I'd like to update the repository.
jerwarren
Regular
Posts: 42 Joined: Fri Feb 10, 2006 8:55 pm
Post
by jerwarren » Sat Sep 23, 2006 6:16 pm
Oh, sorry. Late night hacking
I stuck it at line 131, and got it from the entries include file.
In case you run into the same difficulty I did, the plugin files inexplicably are named 'showentries' rather than 'sidebarentries.'
judebert
Regular
Posts: 2478 Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:
Post
by judebert » Tue Sep 26, 2006 4:43 am
Could be a language thing. Then again, it's already a sidebar plugin, so I guess it does show entries...
Anywho, it's committed to CVS now. Please check and make sure I didn't goof it up.