From: Jim Hu <ji...@ta...> - 2004-08-29 22:32:21
|
Jason, I'm a little confused...I'm viewing what I posted as propose first, get=20= feedback...with code to try since I want to make sure that it works (or=20= at least works almost - I found a minor problem with previewing with my=20= altered config). I've been trying all of my tweaks first before=20 posting, just to make sure that they don't crash and burn horribly. =20= This was a pretty trivial change to implement, so I thought I might as=20= well try it. Are you suggesting I should propose the concept without=20 coding it first (even on my own site?! - note that I didn't post this=20 to the bbs, just to the dev listserve for exactly the reason that you=20 allude to) so that others can suggest better ways to do it? I can do=20 that in future if that's better. I had thought that it would be better=20= to have a working example. I'm very new to this developer list=20 culture, so I apologize if this isn't the way it's done. On Aug 29, 2004, at 9:51 AM, Jason L. Buberel wrote: > Jim, > > Now this would have been a good case for 'propose your changes first,=20= > get feedback, and make the changes afterwards'. Although your approach=20= > does work, I'm not convinced it's the right approach. To be honest, I think my approach is a kludge, and the right way would=20= probably add some fields to the blog_list table in the database for the=20= page_template (I'd probably store the path/filename instead of the html=20= itself, as is done for the entry templates) and to indicate whether a=20 login should be required to view the blog. However, I've been trying=20 to avoid making changes to the database schema. I'm also enough of a=20 newbie to try to make changes in a way where I can go back easily if=20 something goes wrong! > > simplog's current mechanism for this kind of thing, as seen in the=20 > first few lines below, is to check for a file (config.php), then=20 > create it from a master or template if it does not exist (via=20 > install.php process).=A0 Note that I am NOT doing this to customize the appearance of the blog=20 entries - I understand how Simplog does that now, and although the=20 template admin script doesn't work on my setup (I've been editing them=20= directly in mySQL), the entry templating is unchanged by my proposal. =20= I'm changing the ability to customize the web page wrapper that lays=20 out the header/menu/entries/edit/admin/blocks/other. As far as I can=20 tell, the release of Simplog doesn't currently include that, and the=20 standard approach is to make a wrapper that calls blog.php or the rss=20 feed to place the content inside a custom layout. I don't see where=20 config.php comes into it.. I may be missing something...but it seems=20 like this is what we tell people on the bbs all the time. The problem with this is - and I was led to think about this by=20 visiting your blog (which is much prettier than anything I've done with=20= Simplog so far) - that you can have your main entry views laid out as=20 you want, but when you search, pick categories, go to archives, or=20 whatever, Simplog runs archive.php, takes its default header, and now=20 your page doesn't look like your other pages...for example, when I go=20 to http://www.buberel.org/myphpblog/jason.php, you have that nice blue=20= margin, black on white header, tasteful grey background etc. But when=20= I click on "Cooking", I get no blue margin, dark grey text on light=20 grey head banner and so on. When I click "back to jason's blog at=20 buberel.com" instead of using the back button on my browser, I'm still=20= in the grey blog version. Looking at your blog makes me hungry, btw! If you ever make it down=20 here to central TX, look me up and I'll take you out for BBQ or=20 Mexican. > Although separating index.php and header.php is probably a good=20 > thing, what if the 'new blog' creation process was reformulated to do=20= > the same thing? > > 1. Click 'Blog Admin' > 2. Click 'Add Blog' > 3. On the 'new blog' form, there would be a checkbox for 'Use custom=20= > templates' > 4. When the user clicks 'Save', we check the value of the checkbox > 5. If selected, we create copies of the blog layout and formatting=20 > template files, using the blog_id as part of the file name, then show=20= > a message to the user with the names of the files they can now=20 > customize. > > How about that approach? That might be a nice way to do it - and would be compatible with the=20 approach I proposed, unless I misunderstand you. However, I think a=20 simpler alternative would be to leave off the checkbox and just create=20= the copies of the files - and tell the users in the help=20 file/documentation/bbs how to customize. The copies are small, so the=20= extra storage is pretty trivial, and if the user doesn't want to=20 customize, it would be transparent that the different blogs are running=20= off different but identical template copies (I have a feeling I could=20 have said that more clearly but I hope you see what I mean...). Jim > > -jason > <snip>= |