Changed link list so users couldn't see edit icons unless they had the privileges to edit the link.
This commit is contained in:
parent
f6fbd49a0c
commit
92746b3373
2 changed files with 8 additions and 1 deletions
|
|
@ -10,7 +10,13 @@ delete from international where languageId=1 and namespace='Article' and interna
|
|||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (71,1,'Article','Articles are the Swiss Army knife of WebGUI. Most pieces of static content can be added via the Article.\r\n<br><br>\r\n\r\nNOTE: You can create a multi-paged article by placing the seperator macro (^-;) at various places through-out your article.\r\n\r\n<p />\r\n<b>Template</b><br/>\r\nSelect a template to layout your article.\r\n<p />\r\n\r\n<b>Image</b><br>\r\nChoose an image (.jpg, .gif, .png) file from your hard drive. This file will be uploaded to the server and displayed in your article.\r\n<br><br>\r\n\r\n\r\n<b>Attachment</b><br>\r\nIf you wish to attach a word processor file, a zip file, or any other file for download by your users, then choose it from your hard drive.\r\n<br><br>\r\n\r\n<b>Link Title</b><br>\r\nIf you wish to add a link to your article, enter the title of the link in this field. \r\n<br><br>\r\n<i>Example:</i> Google\r\n<br><br>\r\n\r\n<b>Link URL</b><br>\r\nIf you added a link title, now add the URL (uniform resource locator) here. \r\n<br><br>\r\n<i>Example:</i> http://www.google.com\r\n\r\n<br><br>\r\n\r\n<b>Convert carriage returns?</b><br>\r\nIf you\'re publishing HTML there\'s generally no need to check this option, but if you aren\'t using HTML and you want a carriage return every place you hit your "Enter" key, then check this option.\r\n<p>\r\n\r\n<b>Allow discussion?</b><br>\r\nChecking this box will enable responses to your article much like Articles on Slashdot.org.\r\n<p>\r\n\r\n\r\n<b>Filter Post</b><br>\r\nSelect the level of content filtering you wish to perform on all discussion posts.\r\n<p>\r\n\r\n<b>Who can post?</b><br>\r\nSelect the group that is allowed to post to this discussion.\r\n<p>\r\n\r\n<b>Edit Timeout</b><br>\r\nHow long should a user be able to edit their post before editing is locked to them?\r\n<p>\r\n<i>NOTE:</i> Don\'t set this limit too high. One of the great things about discussions is that they are an accurate record of who said what. If you allow editing for a long time, then a user has a chance to go back and change his/her mind a long time after the original statement was made.\r\n<p>\r\n\r\n<b>Karma Per Post</b><br>\r\nHow much karma should be given to a user when they post to this discussion?\r\n<p>\r\n\r\n<b>Who can moderate?</b><br>\r\nSelect the group that is allowed to moderate this discussion.\r\n<p>\r\n\r\n<b>Moderation Type?</b><br>\r\nYou can select what type of moderation you\'d like for your users. <i>After-the-fact</i> means that when a user posts a message it is displayed publically right away. <i>Pre-emptive</i> means that a moderator must preview and approve users posts before allowing them to be publically visible. Alerts for new posts will automatically show up in the moderator\'s WebGUI Inbox.\r\n<p>\r\n<i>NOTE:</i> In both types of moderation the moderator can always edit or delete the messages posted by your users.\r\n<p>\r\n\r\n<b>Add edit stamp to posts?</b><br>\r\nDo you wish to "stamp" all edits so that you can track who edited a post and when?\r\n<p>', 1050146714);
|
||||
delete from international where languageId=1 and namespace='Article' and internationalId=73;
|
||||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (73,1,'Article','The following template variables are available for article templates.\r\n<p/>\r\n\r\n<b>attachment.box</b><br/>\r\nOutputs a standard WebGUI attachment box including icon, filename, and attachment indicator.\r\n<p/>\r\n\r\n<b>attachment.icon</b><br/>\r\nThe URL to the icon image for this attachment type.\r\n<p/>\r\n\r\n<b>attachment.name</b><br/>\r\nThe filename for this attachment.\r\n<p/>\r\n\r\n<b>attachment.url</b><br/>\r\nThe URL to download this attachment.\r\n<p/>\r\n\r\n<b>image.thumbnail</b><br/>\r\nThe URL to the thumbnail for the attached image.\r\n<p/>\r\n\r\n<b>image.url</b><br/>\r\nThe URL to the attached image.\r\n<p/>\r\n\r\n<b>post.label</b><br/>\r\nThe translated label to add a comment to this article.\r\n<p/>\r\n\r\n\r\n<b>post.URL</b><br/>\r\nThe URL to add a comment to this article.\r\n<p/>\r\n\r\n<b>replies.count</b><br/>\r\nThe number of comments attached to this article.\r\n<p/>\r\n\r\n<b>replies.label</b><br/>\r\nThe translated text indicating that you can view the replies.\r\n<p/>\r\n\r\n<b>replies.url</b><br/>\r\nThe URL to view the replies to this article.\r\n<p/>\r\n\r\n\r\n<b>firstPage</b><br/>\r\nA link to the first page in the paginator.\r\n<p/>\r\n\r\n<b>lastPage</b><br/>\r\nA link to the last page in the paginator.\r\n<p/>\r\n\r\n<b>nextPage</b><br/>\r\nA link to the next page forward in the paginator.\r\n<p/>\r\n\r\n<b>previousPage</b><br/>\r\nA link to the next page backward in the paginator.\r\n<p/>\r\n\r\n<b>pageList</b><br/>\r\nA list of links to all the pages in the paginator.\r\n<p/>\r\n\r\n<b>multiplePages</b><br/>\r\nA conditional indicating whether there is more than one page in the paginator.\r\n<p/>\r\n\r\n<b>isFirstPage</b><br/>\r\nA conditional indicating whether the visitor is viewing the first page.\r\n<p/>\r\n\r\n<b>isLastPage</b><br/>\r\nA conditional indicating whether the visitor is viewing the last page.\r\n<p/>\r\n\r\n', 1050146621);
|
||||
|
||||
delete from international where languageId=1 and namespace='LinkList' and internationalId=76;
|
||||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (76,1,'LinkList','The following is the list of template variables available in Link List templates.\r\n<p/>\r\n\r\n\r\n<b>addlink.url</b><br/>\r\nThe URL to add a link to this link list.\r\n<p/>\r\n\r\n<b>addlink.label</b><br/>\r\nThe translated label for the add link URL.\r\n<p/>\r\n\r\n<b>canEdit</b><br/>\r\nA condition indicating whether the user can edit the links.\r\n<p/>\r\n\r\n\r\n<b>link_loop</b><br/>\r\nThis loop contains all of the information about each link.\r\n<blockquote>\r\n\r\n<b>link.url</b><br/>\r\nThe URL for this link.\r\n<p/>\r\n\r\n<b>link.name</b><br/>\r\nThe text to be linked.\r\n<p/>\r\n\r\n<b>link.controls</b><br/>\r\nThe WebGUI management controls for this link.\r\n<p/>\r\n\r\n<b>link.newwindow</b><br/>\r\nA conditional as to whether the link should be opened in a new window.\r\n<p/>\r\n\r\n<b>link.description</b><br/>\r\nThe description of this link.\r\n<p/>\r\n\r\n</blockquote>\r\n<p/>\r\n', 1050158350);
|
||||
delete from template where namespace='LinkList' and templateId<10;
|
||||
INSERT INTO template VALUES (4,'Descriptive','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p />\r\n</tmpl_if>\r\n\r\n<tmpl_if session.var.adminOn><tmpl_if canEdit>\r\n <a href=\"<tmpl_var addlink.url>\"><tmpl_var addlink.label></a><p />\r\n</tmpl_if></tmpl_if>\r\n\r\n<tmpl_loop link_loop>\r\n <tmpl_if session.var.adminOn><tmpl_if canEdit>\r\n <tmpl_var link.controls> <br />\r\n </tmpl_if></tmpl_if>\r\n\r\n <a href=\"<tmpl_var link.url>\"\r\n <tmpl_if link.newwindow>\r\n target=\"_blank\"\r\n </tmpl_if>\r\n ><span class=\"linkTitle\"><tmpl_var link.name></span></a>\r\n\r\n <tmpl_if link.description>\r\n - <tmpl_var link.description>\r\n </tmpl_if>\r\n <p />\r\n</tmpl_loop>\r\n','LinkList');
|
||||
INSERT INTO template VALUES (3,'Ordered List','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p />\r\n</tmpl_if>\r\n\r\n<tmpl_if session.var.adminOn><tmpl_if canEdit>\r\n <a href=\"<tmpl_var addlink.url>\"><tmpl_var addlink.label></a><p />\r\n</tmpl_if></tmpl_if>\r\n\r\n<ol>\r\n<tmpl_loop link_loop>\r\n <li>\r\n <tmpl_if session.var.adminOn><tmpl_if canEdit>\r\n <tmpl_var link.controls>\r\n </tmpl_if> </tmpl_if>\r\n\r\n <a href=\"<tmpl_var link.url>\"\r\n <tmpl_if link.newwindow>\r\n target=\"_blank\"\r\n </tmpl_if>\r\n ><span class=\"linkTitle\"><tmpl_var link.name></span></a>\r\n\r\n <tmpl_if link.description>\r\n - <tmpl_var link.description>\r\n </tmpl_if>\r\n </li>\r\n</tmpl_loop>\r\n</ol>','LinkList');
|
||||
INSERT INTO template VALUES (1,'Default Link List','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p />\r\n</tmpl_if>\r\n\r\n<tmpl_if session.var.adminOn>\r\n<tmpl_if canEdit>\r\n <a href=\"<tmpl_var addlink.url>\"><tmpl_var addlink.label></a><p />\r\n</tmpl_if>\r\n</tmpl_if>\r\n\r\n<tmpl_loop link_loop>\r\n <tmpl_if session.var.adminOn>\r\n <tmpl_if canEdit>\r\n <tmpl_var link.controls>\r\n </tmpl_if>\r\n </tmpl_if>\r\n ·\r\n <a href=\"<tmpl_var link.url>\"\r\n <tmpl_if link.newwindow>\r\n target=\"_blank\"\r\n </tmpl_if>\r\n ><span class=\"linkTitle\"><tmpl_var link.name></span></a>\r\n\r\n <tmpl_if link.description>\r\n - <tmpl_var link.description>\r\n </tmpl_if>\r\n <br/>\r\n</tmpl_loop>\r\n','LinkList');
|
||||
INSERT INTO template VALUES (2,'Unordered List','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p />\r\n</tmpl_if>\r\n\r\n<tmpl_if session.var.adminOn><tmpl_if canEdit>\r\n <a href=\"<tmpl_var addlink.url>\"><tmpl_var addlink.label></a><p />\r\n</tmpl_if></tmpl_if>\r\n\r\n<ul>\r\n<tmpl_loop link_loop>\r\n<li>\r\n <tmpl_if session.var.adminOn><tmpl_if canEdit>\r\n <tmpl_var link.controls>\r\n </tmpl_if></tmpl_if>\r\n \r\n <a href=\"<tmpl_var link.url>\"\r\n <tmpl_if link.newwindow>\r\n target=\"_blank\"\r\n </tmpl_if>\r\n ><span class=\"linkTitle\"><tmpl_var link.name></span></a>\r\n\r\n <tmpl_if link.description>\r\n - <tmpl_var link.description>\r\n </tmpl_if>\r\n </li>\r\n</tmpl_loop>\r\n</u>','LinkList');
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@ sub www_view {
|
|||
my (%var, @linkloop, $controls, $link, $sth);
|
||||
$var{"addlink.url"} = WebGUI::URL::page('func=editLink&lid=new&wid='.$_[0]->get("wobjectId"));
|
||||
$var{"addlink.label"} = WebGUI::International::get(13,$_[0]->get("namespace"));
|
||||
$var{canEdit} = WebGUI::Privilege::canEditPage();
|
||||
$sth = WebGUI::SQL->read("select * from LinkList_link where wobjectId=".$_[0]->get("wobjectId")."
|
||||
order by sequenceNumber");
|
||||
while ($link = $sth->hashRef) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue