Recent Topics

1 Feb 22, 2006 01:00    

I cannot seem to figure out how to 'manage' the templates tab area of the b2admin area.

Something I've noticed is if you remove the /skins/custom you get this error (below): Question One how do I stop this from happening, I assume I need to point the template listing mechanism to the default skin folder, but how?

This screen allows you to edit the custom skin (located under /skins/custom). 

You can edit any of the following files (provided it's writable by the server, e.g. CHMOD 766):

Directory /var/www/html/skins/custom not found.

Question Two: I'm wondering how does the list that is normally present in this area get constructed and how do you control it, or where and how?

Help as always appreciated

-Mark
http://www.nthview.com

2 Feb 22, 2006 04:31

markfaulkner wrote:

Question One how do I stop this from happening, I assume I need to point the template listing mechanism to the default skin folder, but how?

It's in admin/b2template.php. Simply open the file and replace all instances of 'custom' to 'your own skin foldername'.

markfaulkner wrote:

Question Two: I'm wondering how does the list that is normally present in this area get constructed and how do you control it, or where and how?

Once you're done with the above changes, you'll see all your files when you go to the templates tab area of the b2admin area. It's automatically generated. ;)

3 Feb 22, 2006 18:07

Righto, what I'd really like to do is reconstruct that a bit. Currently it seems to toss up all files in the designated 'skins' folder, but I'm thinking that there are a number of other files throughout the 'system' that would be handy to edit easier than with a text editor (provided you know what you are doing of course), for instance the 'default.php' or 'summary.php' templates. Addtionally I think it is a little troublesome to provide access blankedly to the entire contents of a skins template folder when really there are probably only a couple files in there that deserve any attention of this sort.

I must admit that I have a presumption here that 'most' of the time users that know what they are doing would just use a desktop text editor and the usefulness of the 'templates' tab is to provide restricted access to the systems files such that the slightly less initiated could edit some content but not really stuff the entire bundle of joy. Possibly this premise is not aligned with B2evo's developers views.

[u]So my question clarified would be:[/u]
How do you reconstruct the code in the b2templates.php to, rather than list the contents of the designated skin folder, list individual files accross the system?

Cheers,
Mark
=======================================
"Creation can become irrelevant over Time"

4 Feb 22, 2006 22:54

You're right about other files throughout the 'system' that you'll edit more often during customization. However, I strongly discourage you from making them available via the b2template.php since that would means opening a window for hackers to access your system folders. (a good hack should not compromise system security) ;)

Take the safer conventional approach. Edit your files locally and upload via ftp B). Sorry for not being able to help on this one... :oops:

5 Feb 23, 2006 05:32

I appreciate your caution and I think we actually agree that there is a proper scope in which access to such files of the system should be handed out.

I cannot in my own mind though see much difference between providing access to the templates that make up the Blog skins and the default.php page for instance, as the default page is not much more than a slightly different blog skin, or the summary.php page which is a listing of recent posts for each blog.

I'm actually interested in restricting access a bit more than the 'out of the box' setup. What I've done to my blog skins is create templates that hold content for various areas and I 'include' those into the various skins of the portal, it is these 'content templates' that I would give administrators access to thereby hidding from view files that, if improperly handled, could screw the pooch.

I do have to say again that I appreciate your approach it is one my grand ma ma would call not giving dangerous toys to children.

Cheers, -Mark

6 Feb 23, 2006 10:53

You'll have to do some programming on your end. The ONLY file that needs customizing is the b2template.php file itself. You'll only need to play around with these variables:-

$this_file
$edit_folder 
$file

You can 'hard-code' your list of 'content templates' and put them in an array using the while loop. Good luck! ;)


Form is loading...