waifuchan / drydock

Automatically exported from code.google.com/p/drydock
0 stars 0 forks source link

static pages function #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Would be useful to define a static page such as "rules page" or "do not
post list" or other static pages.  Pages could be edited from an admin module.

Original issue reported on code.google.com by TaQS...@gmail.com on 22 Sep 2008 at 11:39

GoogleCodeExporter commented 8 years ago
I propose that each page would have the following attributes:
* Title
* Name (unique, used for identification)
* Content
* Publish status (Unpublished (admin only), Published (mod only), Published
(registered users only), Published (available to all) )

In the case of the latter three, they could be accessed via the following URL:
misc.php?action=viewpage&name=_____ (where the ____ corresponds with the unique 
name
attribute mentioned prior)

This would require the following:
* New database table and all that entails
* Modifications to misc.php (not created yet but will be for 0.3.1)
* Addition of the admin section template
* Modification of ThornModDBI to use in admin.php

It could be a heavily modified version of the blotter code.  It's pretty 
similar.

Original comment by all.sta...@gmail.com on 9 Dec 2008 at 10:22

GoogleCodeExporter commented 8 years ago
I think we might even be able to make this into 0.3.1, to be honest.

Original comment by all.sta...@gmail.com on 14 Dec 2008 at 11:26

GoogleCodeExporter commented 8 years ago
I actually think this would be really awesome for 0.3.1 and I might work on it 
in a
few days.

Original comment by all.sta...@gmail.com on 21 Dec 2008 at 3:04

GoogleCodeExporter commented 8 years ago
Revision 105 28]

Original comment by all.sta...@gmail.com on 24 Dec 2008 at 6:56

GoogleCodeExporter commented 8 years ago
Alright so I was testing this, and it seems to be caching and building oddly.

1) it's caching the menu, so even after logging out it still displays admin 
stuff on
the side bar
2) It adds the contents of menu.php and bottombar.tpl twice

Also, because there is no easy way to do this now, and because this module has 
made
me think of it, I will be looking into a way to add this to the menu bar either
through adding another field to the db (visible in menu bar bool value) or an 
admin
page to define what is actually in the menu bar (this could be in 032 
regardless)

Let me know your opinions.

Original comment by TaQS...@gmail.com on 14 Jul 2009 at 9:48

GoogleCodeExporter commented 8 years ago
We should be using {insert} instead of {include} for bottombar.tpl, as {insert}
bypasses caching:
http://www.smarty.net/manual/en/language.function.insert.php

I don't know why it would show twice though.  I don't see anywhere in the code 
that
is instantly wrong.

Original comment by all.sta...@gmail.com on 19 Jul 2009 at 5:30

GoogleCodeExporter commented 8 years ago
That would be fine, except that insert is a different function than include.  
That
is, it is meant for different purposes than just a noncahced version of 
include.  

http://forums.devshed.com/php-development-5/smarty-insert-tag-573701.html

Original comment by TaQS...@gmail.com on 19 Jul 2009 at 7:34

GoogleCodeExporter commented 8 years ago
As per your suggestion I just took out the cache id param from the function 
call and
that seems to have fixed it.  I'll find out for sure after testing but for now 
it
looks good.  Will commit after I fix a few other things.

Original comment by TaQS...@gmail.com on 5 Aug 2009 at 4:51

GoogleCodeExporter commented 8 years ago
I think this is done, but I'd like to put in a hook to generate a front page
(basically it comes with one page pre-made, FrontPage, and has the "This site is
powered by the drydock image board script." text present.  This is the only 
change I
would like to make to this before 031 hits trunk, but I don't think we need to 
edit
this code to do it (I'll just call it from drydock.php)

Original comment by TaQS...@gmail.com on 25 Aug 2009 at 11:09

GoogleCodeExporter commented 8 years ago
Done and done.

Original comment by TaQS...@gmail.com on 26 Aug 2009 at 4:20

GoogleCodeExporter commented 8 years ago

Original comment by TaQS...@gmail.com on 26 Aug 2009 at 5:19