Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Article Manager 2:
Static Placeholders

 

 


scritty
User

Jan 7, 2007, 10:19 AM

Post #1 of 6 (403 views)
Shortcut
Static Placeholders Can't Post

In addition to the regular list of placeholders where the admin has the option of changing the placeholder name, changing it's value, or removing the placeholder altogether, would it be possible to add static placeholders where only the placeholder value could be changed with the Admin?

For example, I'm creating a site for a newspaper. Below the regular list of placeholders, I'd like to add a placeholder named "my.topbannerad". The value of this particular placeholder could be edited within Admin, but the user could not change the placeholder name or remove this placeholder.

I realize that each of these "static" placeholders would need to be hard coded into the "placeholders.html" page. And that's fine. I just need to know if it's possible and how it could be done.

The reason I would like this is to create an Admin that is very specific for this newspaper. Once I hand the Admin over to them, I don't want them to have the option to change the names or remove particular placeholders as it would affect the layout of the page. I would only want them to be able to change the value of these static placeholders.


ross
Staff / Moderator


Jan 7, 2007, 4:03 PM

Post #2 of 6 (393 views)
Shortcut
Re: [scritty] Static Placeholders [In reply to] Can't Post

Hi there.

Thanks for posting!

I don't think I quite get it here. From the sounds of it, you are going to be looking for Article Manager's My Placeholder section. What this will let you do is create a whole new placeholder that will be available to any template you like but only editable by an administrator.

The only thing here is the fact that you specifically mentioned "my.topbranneradd" makes me think you were already aware of the My Placeholders as that's the naming convention for them.

Had you already setup some placeholders that way?

Another thing I was thinking you might be aiming for here is a placeholder that you can edit right along with the other article fields but only if you are an admin.

If you could give me some more details about what's going on here, I am sure there is going to be a nice easy solution.

I look forward to hearing from you Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.




scritty
User

Jan 7, 2007, 4:57 PM

Post #3 of 6 (388 views)
Shortcut
Re: [ross] Static Placeholders [In reply to] Can't Post

Thanks for the response. I totally understand how to use the placeholders the way they are set up within AM. What I'm trying to do is make the Admin even simpler to use for someone with no understanding or skills to insert placeholders within the templates.

Let me try explaining my example again. I've inserted a placeholder named "$my.topbannerad$" within the "header.html" template. Once I give the people that run the newspaper access to the Admin, I don't want them to be able to rename that placeholder. I only want them to be able to change the value of that placeholder. Because if they were to intentionally, or accidently, change the name of the placeholder, the template (which they don't know how to edit), would no longer be able to find that particular placeholder.

Or for another example, I'd like to add a placeholder to the list where instead of the placeholder name text field (the placeholder name could be hidden), it would just show some HTML text that said "Name of Newspaper". Then next to that would be the textarea field which defines the value of that placeholder where they could enter the name of the newspaper. This would keep them from changing the name of the placeholder.

So, in addition to the list of "dynamic" placeholders where the name and value can be changed, I would like to add a list of placeholders where the name of the placeholder is hidden and only the value can be changed. This would also allow me to add a description of that placeholder to explain what that placeholder is used for. In my first example above, the description would say something like "Enter the URL for the ad you want placed in the top banner".

I believe that the current list of placeholders is generated using the code starting around line 176 of the "placeholders.html" file. What I'd like to add after that list of placeholders are some hard-coded placeholders so that the placeholder name would be hidden and the placeholder could not be removed, only the value of the placeholder could be changed within Admin.

Remember, while many of the people who use your software have a reasonable understanding of how AM functions, if you put all the Admin options into the hands of someone who doesn't know what they're doing, things could potentially get messed up. That's why I'm trying to simplify the Admin interface and more or less hide certain things.

(This post was edited by scritty on Jan 7, 2007, 5:13 PM)


Divya
User

Jan 7, 2007, 9:59 PM

Post #4 of 6 (374 views)
Shortcut
Re: [scritty] Static Placeholders [In reply to] Can't Post

Hi scritty,

Thanks for the post Smile,

If i understood your problem correctly you may be trying to make the placeholder name uneditable by the users from Admin>My placeholders section.I am not sure this can be done with articlemanager2.It could be nice if you be able to give me some more details about what's going on here .

I look forward to hear from you
Cheers
Divya


scritty
User

Jan 8, 2007, 6:30 AM

Post #5 of 6 (361 views)
Shortcut
Re: [Divya] Static Placeholders [In reply to] Can't Post

I don't need or want to do anything with the current list of placeholders. I am just wondering if there is a way to add additional placeholders where the name of the placeholder cannot be edited from within Admin. I realize that this would require that the name of these placeholders be hard coded into the "placeholders.html" or some other file, and then somehow manually added to the database so that they aren't overwritten when the regular list of placeholders is saved. Is this possible?

Let me try illustrating my question with some code.

The following code is found in the "placeholder.html" file around line 176:


// generate row HTML
var rowHTML = ''
+ ' <tr id="' +fields._listname+ ':' +fields._num+ '">\n'
+ ' <td width="25"><img src="$_weburl$images/spacer.gif" alt="" height="1" width="25" border="0" /></td>\n'
+ ' <td valign="top" class="noBreak">my.<input type="text" name="'+fnPrefix+'user_placeholder_name" value="'+fields.user_placeholder_name+'" style="width: 85%" onchange="dlist_saveRowOnChange(' +nameNumArgs+ ')" /></td>\n'
+ ' <td><textarea name="'+fnPrefix+'user_placeholder_value" style="width: 100%; height: 55px;"'
+ ' onchange="dlist_saveRowOnChange(' +nameNumArgs+ ')">'+fields.user_placeholder_value+'</textarea></td>\n'
+' <td align="center">\n'
+' <span class="fakelink" onclick="myPlaceholders_removeRow(' +nameNumArgs+ ')">remove</span>\n'
+' </td>\n'
+ ' </tr>\n';

return rowHTML;


I believe that the above code is what generates the list of placeholders. What I'm looking for is a way to add additional placeholders following the regular generated list that would have the <input> tag as hidden, and have the placeholder name and value hard coded into the <input> and <textarea> tags?

(This post was edited by scritty on Jan 8, 2007, 6:53 AM)


Donna
Staff / Moderator


Jan 8, 2007, 3:23 PM

Post #6 of 6 (346 views)
Shortcut
Re: [scritty] Static Placeholders [In reply to] Can't Post

Hi Scritty,

At this point, there's no way to "lock" the My Placeholders from being able to be modified by an admin user. Article Manager is designed to give full access to Admin users, and be as customizable as possible without having to modify any code.

It looks like your main concern is your users making changes to the my.placeholders that break the site. Since anyone who has access to the my.placeholders page also has access to the database settings, the publish rules, the server settings, etc... the my.placeholders are really just the tip of the iceberg. Anyone who can do damage via the My.Placeholders can do considerably more damage in, for example, the Publish Rules.

In a case like that, I would recommend limiting their account to an Editor or Trusted Writer, or if they must be able to modify the My Placeholders, to offer them pretty extensive documentation on how they work, and what they specifically should know about making changes.

I hope this helps! Let me know if you have any other questions. :)

Donna


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4