Posts: 1,108
Threads: 70
Joined: Aug 2009
This is a redesign I'm working on for my site,
http://cmstest.digimute.com
based on the Inverted Headline, by www.demusdesign.com
Not much too it, simple design, blogging system working, commenting nearly there...
Theme includes my own function files to replace menu creation and a few others.
There is also slight modification to allow extended options on pages which I hope
will be included in some form later...
just have to think of some content now ....
Rgds,
Mike.
Posts: 7
Threads: 1
Joined: Aug 2009
I like the design. Clean and simple. Did you customize things to get the blog to work?
Posts: 1,108
Threads: 70
Joined: Aug 2009
Not much, I had to add 2 extra options to the pages , pageType and Published.
pageTYpe="blog" for blog pages, other wise there normal pages.
(can all be achieved using the TAGS option, but I need a little extra)
I use a little trickery to create the minifeeds on the front page, blog pages that have a minifeed must have "[***]"
somewhere in the text, this is replaced by the "read more..." link on the front page... simply removed on the full
page view.
Otherwise it just GetSimple....
by far the easiest CMS i've used, and I've gone through a few in the last year...
Mike.
Posts: 83
Threads: 10
Joined: Aug 2009
that's pretty cool - I'd considered how to make this work as a mini-blog. I only wonder if it doesn't get overloaded with pseudo "Posts". (Same problem I had with FrogCMS) unless there was a tab specifically for Posts instead of Pages. Then we get back to... "Hmm, should I use something like WP instead - which includes all the blog tools by default.
Still a great option for someone who only "blogs" maybe once a month or less
Posts: 1,108
Threads: 70
Joined: Aug 2009
I just setup a dummy page called "blogs" which is never displayed.
All blog post are created as normal with the "Blogs" page as the parent
so it looks like so..
http://cmstest.digimute.com/images/pages.png
Posts: 1,848
Threads: 86
Joined: Aug 2009
Mike - when you get things working the way you like it, I would love to see the code. There definitely won't be a blog section added to the getsimple core, but if I could add a function or two to make it easier for you, then I would be willing to do that if it makes sense.
- Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 83
Threads: 10
Joined: Aug 2009
Yes! I'd like to see this too. (Actually the Blog/Child Posts things was how I found the rename parent bug...) Pretty cool, n00dles101
Posts: 11
Threads: 1
Joined: Aug 2009
I really like the way this turned out and started playing around with a design similar myself. I have a question though n00dles101. How were you able to modify the menu buttons to allow for more than 1 line of text (ie: Blog blog, ABOUT this template), or was this achieved without using the built-in navigation? I'm kinda new to all of this, so please excuse me if this is an ignorant question.
Thanks,
Garrett
Posts: 1,108
Threads: 70
Joined: Aug 2009
I made a couple of small changes but you can achieve the same using the built in menu system.
Use a delimeter in the menu text e.g. "About Us | Contact"
Next copy the get_navigation() function from the central code (inc/theme_functions.php)
into a file in your template directory and include it in your template. Rename it to get_navigationnew() or whatever...
Change this to parse out the values and display as needed.
then call this function from within your template for menu creation instead of the default one.
This way your not making changes to the core code and it can be included in templates...
Mike.
Posts: 83
Threads: 10
Joined: Aug 2009
n00dles101 Wrote:I made a couple of small changes but you can achieve the same using the built in menu system.
Use a delimeter in the menu text e.g. "About Us | Contact"
Mike - Does this (or "will this") work with Pretty URLs vs. ID? style URLs?
thx,
Kel
Posts: 11
Threads: 1
Joined: Aug 2009
Thank you so much for the quick response Mike. I think I sorta follow you, but again, I'm still kinda new all the way around when it comes to PHP. I have mainly only used it to work includes into sites but I want to learn the ins and outs of truly using it to make all sorts of things happen on pages.
Anyway, I believe I follow you up to the point of copying the get_navigation() function. I think understand how to include it in the template, but I'm not sure I follow in regards to how to change it to parse out the values and display them as needed. Is there any way you could show me a copy of your modified functions?
I just really like how your modified theme came out and I'd like to work with something similar, but the overall look is just really cool. I don't want to steal your design but I think it would make a great base for a really cool template with what you're going for there.
Thanks again,
Garrett
Posts: 1,108
Threads: 70
Joined: Aug 2009
badcat - yes should work with pretty vs URL. Slug name is passed to the page not the menu text
g.net - sample function here. assuming "|" is the delimeter.
Code: function get_mynavigation($currentpage) {
global $PRETTYURLS;
global $SITEURL;
$menu = '';
$path = "data/pages";
$dir_handle = @opendir($path) or die("Unable to open $path");
$filenames = array();
while ($filename = readdir($dir_handle)) {
$filenames[] = $filename;
}
$count="0";
$pagesArray = array();
if (count($filenames) != 0) {
foreach ($filenames as $file) {
if ($file == "." || $file == ".." || is_dir("data/pages/".$file) || $file == ".htaccess" ) {
// not a page data file
} else {
$thisfile = @file_get_contents('data/pages/'.$file);
$data = simplexml_load_string($thisfile);
if ($data->private != 'Y') {
$pagesArray[$count]['menuStatus'] = $data->menuStatus;
$pagesArray[$count]['menuOrder'] = $data->menuOrder;
$pagesArray[$count]['menu'] = strtoupper($data->menu);
$pagesArray[$count]['url'] = $data->url;
$pagesArray[$count]['title'] = $data->title;
$pagesArray[$count]['parent'] = $data->parent;
$count++;
}
}
}
}
$pagesSorted = subval_sort($pagesArray,'menuOrder');
if (count($pagesSorted) != 0) {
foreach ($pagesSorted as $page) {
$sel = ''; $classes = '';
$url_nav = $page['url'];
if ($page['menuStatus'] == 'Y') {
if ("$currentpage" == "$url_nav") { $classes = "current ". $url_nav; } else { $classes = $url_nav; }
if ($page['menu'] == '') { $page['menu'] = $page['title']; }
if ($page['title'] == '') { $page['title'] = $page['menu']; }
if ($PRETTYURLS == '1') {
if ($page['parent'] != '') {$page['parent'] = $page['parent']."/"; }
// parse menu text for | and split output
$pieces = explode("|", $page['menu']);
if ($url_nav == 'index' ) { $url_nav = ''; }
$menu .= '<li><a class="nav" href="'. $SITEURL . @$page['parent'] . $url_nav .'" title="'.stripslashes(strip_tags(html_entity_decode($page['title']))).'">'.$pieces[0].'<br/>'.$pieces[1].'</a></li>';
} else {
$menu .= '<li><a class="nav" href="'. $SITEURL .'index.php?id='.$url_nav.'" title="'.stripslashes(strip_tags(html_entity_decode($page['title']))).'">'..$pieces[0].'<br/>'.$pieces[1].'</a></li>';
}
}
}
echo $menu;
echo "<div class=\"clearer\"> </div>";
}
closedir($dir_handle);
}
I'm just exploding the menu text string and outputting $peices[1] & pieces[2] instead, style as you need.
rest of the function is identical to original.
Mike
Posts: 1,848
Threads: 86
Joined: Aug 2009
Mike... i think the best way to implement this type of stuff is with the way Wordpress does it: if a theme has a functions.php within the theme directory, then it is included and any functions within there will be usable to the theme.
http://codex.wordpress.org/Theme_Develop...tions_File
I think this would be a great low-bloat feature that could work wonders for theme developers.
- Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 1,108
Threads: 70
Joined: Aug 2009
Chris,
Sounds good, at least then we have a standard way of doing things for theme developers...
Mike.
|