Re: fancy urls for items manager
I managed to get the items manager to display the items without the "?item=" part of the URL;
not sure if i did it the best way, but it seems to be working:
first i deleted the "?item=" from line 227 of the display-items.php
227replaced with
227
then i added this rule to the htaccess, where 'items' is the slug where you display the item details.
also figured out how to have the items display in reverse alphabetical by changing line 204 from 'asort' to 'arsort';
this could be useful if you wanted to display items with the most recent at the top;
you could name the items like "(2011-11-12) Item Name", and then use custom fields to manage your item title, keeping the default title field for sorting and the page slug. Actually if there was a way to specify a custom page slug that would be helpful, rather than it having to use the item title.
Another bug that I discovered with this is that the plugin doesn't seem to like custom fields with a '-' in the name of the field, for example "album-title"; Seems that it won't recognize/disply fields with this dash; so i'm using underscores;
So the remaining bugs that I'm aware of are:
1.) the stripslashes problem with the items editor (the slashes seem to get added after editing/saving an item - I was able to remove them from the XML file and the items display fine); currently can't put any links inside of a WYSIWYG field or the plugin strips the link...
2.) the '-' problem with the custom fields
3.) one other thing is that the plugin should prevent users from creating a field called 'title' since that seems to already be in use, and could mess things up if there were 2 fields with the same name...
-marc
I managed to get the items manager to display the items without the "?item=" part of the URL;
not sure if i did it the best way, but it seems to be working:
first i deleted the "?item=" from line 227 of the display-items.php
227
Code:
$url = $SITEURL.$item_file_details."/?item=".$url;
227
Code:
$url = $SITEURL.$item_file_details."/".$url;
then i added this rule to the htaccess, where 'items' is the slug where you display the item details.
Code:
RewriteRule ^items/([^/.]+)/?$ /items/?item=$1 [L]
also figured out how to have the items display in reverse alphabetical by changing line 204 from 'asort' to 'arsort';
this could be useful if you wanted to display items with the most recent at the top;
you could name the items like "(2011-11-12) Item Name", and then use custom fields to manage your item title, keeping the default title field for sorting and the page slug. Actually if there was a way to specify a custom page slug that would be helpful, rather than it having to use the item title.
Another bug that I discovered with this is that the plugin doesn't seem to like custom fields with a '-' in the name of the field, for example "album-title"; Seems that it won't recognize/disply fields with this dash; so i'm using underscores;
So the remaining bugs that I'm aware of are:
1.) the stripslashes problem with the items editor (the slashes seem to get added after editing/saving an item - I was able to remove them from the XML file and the items display fine); currently can't put any links inside of a WYSIWYG field or the plugin strips the link...
2.) the '-' problem with the custom fields
3.) one other thing is that the plugin should prevent users from creating a field called 'title' since that seems to already be in use, and could mess things up if there were 2 fields with the same name...
-marc