![]() |
GS Blog v1.4 - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: GS Blog v1.4 (/showthread.php?tid=3200) |
GS Blog v1.4 - studiosi - 2012-05-28 In function show_blog_navigation, why is the right arrow inside this if? if ($index < $total && $count >= $Blog->getSettingsData("postperpage")) { ... } I'm missing something? thanks everybody, GS Blog v1.4 - studiosi - 2012-05-28 also, an empty <div class="blog_page_navigation"> is produced after each post, even if it is not the last in the page... GS Blog v1.4 - mikeh - 2012-05-28 studiosi Wrote:In function show_blog_navigation, why is the right arrow inside this if? I think you are referring to $Blog->getSettingsData("postperpage") The $Blog-> represents an instance of the 'Blog' class. (you will see $Blog = new Blog at the top of the function). In that particular method call, we are returning the number of posts per page the user defined. So if $index (the current blog page the user is on (page=x in the url)) is less then the total amount of blog pages and count (the number of posts on the current page) is less then the user defined amount of posts per page, then do what is in the conditional brackets. I will look into this problem tomorrow when I have some more time. GS Blog v1.4 - studiosi - 2012-05-28 I have a solution for both problems. It was because of a faulty design of a couple of functions in the core. Please Mikeh, add this to the main distribution so others don't have to scratch their heads like me ![]() // show_posts_page function show_posts_page($index=0) { $Blog = new Blog; $posts = $Blog->listPosts(true, true); if($Blog->getSettingsData("allpostsadtop") == 'Y') { ?> <div class="blog_all_posts_ad"> <?php echo $Blog->getSettingsData("addata"); ?> </div> <?php } if(!empty($posts)) { $pages = array_chunk($posts, intval($Blog->getSettingsData("postperpage")), TRUE); if (is_numeric($index) && $index >= 0 && $index < sizeof($pages)) { $posts = $pages[$index]; } else { $posts = array(); } $count = 0; $lastPostOfPage = false; foreach ($posts as $file) { $count++; show_blog_post($file['filename'], true); if($count == sizeof($posts) && sizeof($posts) > 0) { $lastPostOfPage = true; } if (sizeof($pages) > 1) { // We know here that we have more than one page. $maxPageIndex = sizeof($pages) - 1; show_blog_navigation($index, $maxPageIndex, $count, $lastPostOfPage); if($count == $Blog->getSettingsData("postsperpage")) { $count = 0; } } } } else { echo '<p>' . i18n(BLOGFILE.'/NO_POSTS') . '</p>'; } if($Blog->getSettingsData("allpostsadbottom") == 'Y') { ?> <div class="blog_all_posts_ad"> <?php echo $Blog->getSettingsData("addata"); ?> </div> <?php } } // show_blog_navigation function show_blog_navigation($index, $total, $count, $lastPostOfPage) { $Blog = new Blog; $url = $Blog->get_blog_url('page'); if ($lastPostOfPage) { echo '<div class="blog_page_navigation">'; } echo $needsNavigationDiv; //if ($index < $total && $count >= $Blog->getSettingsData("postperpage")) if($index < $total && $lastPostOfPage) { ?> <div class="left"> <a href="<?php echo $url . ($index+1); ?>"> ← <?php echo $Blog->getSettingsData("previouspage"); ?> </a> </div> <?php } ?> <?php //if ($index > 0 && $count >= $Blog->getSettingsData("postperpage")) if ($index > 0 && $lastPostOfPage) { ?> <div class="right"> <a href="<?php echo ($index > 1) ? $url . ($index-1) : substr($url, 0, -6); ?>"> <?php echo $Blog->getSettingsData("nextpage"); ?> → </a> </div> <?php } ?> <?php if ($lastPostOfPage) { echo '</div>'; } } GS Blog v1.4 - studiosi - 2012-05-28 It needs a little bit cleaning up... but I wanted to show the code to you as soon as possible! GS Blog v1.4 - studiosi - 2012-05-28 Also if it is somehow faulty... tell me! (and thankyou again for your work!) GS Blog v1.4 - mikeh - 2012-05-28 studiosi Wrote:I have a solution for both problems. It was because of a faulty design of a couple of functions in the core. Please Mikeh, add this to the main distribution so others don't have to scratch their heads like me Thanks for the update. It would be great if you could update the github repository with your new methods so we can compare the before and after! You can find it here. GS Blog v1.4 - studiosi - 2012-05-28 Of course... I will upload it as soon as i get to know how that works... ![]() GS Blog v1.4 - studiosi - 2012-05-28 studiosi Wrote:Of course... I will upload it as soon as i get to know how that works... okeii... you have a pull request... check it if you like. thankyou all... GS Blog v1.4 - Angryboy - 2012-05-31 Took a while for me to get out of my settled ways with I18N Special Pages and try this thing out properly. Surprised to see that it is doing most of the right things and ticking the right boxes, so very good stuff mikeh :-) Ups
Downs / areas to improve/be careful of...
Don't let this list get in the way of the pieces you are already tackling. You're doing an awesome and very appreciated job already mikeh, so I hope this completed module receives its accolades. :-) GS Blog v1.4 - Dominic - 2012-05-31 Hi Mike, I am poking around GS Blog and love it so far and can see that and your Items Manager becoming my essential web site tools! I do have 2 questions: 1: The Previous Blog Post and Next Blog Post links are not showing up. Is there a known issue with that? I couldn't find it in the forum. 2: When is version 1.2 with the custom fields coming out??? I am really looking forward to that! Thanks again for all your contributions to the GS community. -Dominic P.S. I agree with AngryBoy's wish in the previous post that you stick with a purely XML database. The only reason I am on Get Simple is to avoid MySql. If you start using that, I might as well just go back to wordpress! GS Blog v1.4 - studiosi - 2012-05-31 I did a fork at github to solve some problems with the links... i don't know if the pull request is done, but... check it in my fork if it is not integrated. Check the generated HTML and tweak blog.php if needed... i think that a template system would be a great add on to this project... which is really good work anyways... GS Blog v1.4 - mikeh - 2012-06-01 Dominic Wrote:Hi Mike, I am working on 1.1.4 now. 1.2 should be out within the next week or so. In relation to the database, if I did offer the option for a database it would be completely optional (like the front end user login plugin). I don't know how well the Matrix plugin will scale if someone has a large blog, but I will look into it. The previous and next button fixes will be released today (provided by studiosi) and the page components breaking bug fix is also included (provided by Angryboy GS Blog v1.4 - mikeh - 2012-06-01 Version 1.1.4 Added To Extend
GS Blog v1.4 - mikeh - 2012-06-01 Angryboy Wrote:Took a while for me to get out of my settled ways with I18N Special Pages and try this thing out properly. Surprised to see that it is doing most of the right things and ticking the right boxes, so very good stuff mikeh :-) Thank you for your input. I have incorporated some of your changes into the newest version (pretty urls and label fixes). In terms of the commenting system. Disqus identifies a blog post by the post's slug. That way it doesn't matter what URL structure the user has or if they change it. For now I added a text box in the settings panel (as well as on/off switch) to display css for the blog. GS Blog v1.4 - mikeh - 2012-06-01 studiosi Wrote:I did a fork at github to solve some problems with the links... i don't know if the pull request is done, but... check it in my fork if it is not integrated. Check the generated HTML and tweak blog.php if needed... i think that a template system would be a great add on to this project... which is really good work anyways... I have incorporated your changes into version 1.1.4. Thank you for your contribution. GS Blog v1.4 - shawn_a - 2012-06-01 mikeh Wrote:studiosi Wrote:I did a fork at github to solve some problems with the links... i don't know if the pull request is done, but... check it in my fork if it is not integrated. Check the generated HTML and tweak blog.php if needed... i think that a template system would be a great add on to this project... which is really good work anyways... Does this version have a fix for the content filters issue/pull request I sent you? I haven't checked git lately. GS Blog v1.4 - mikeh - 2012-06-01 shawn_a Wrote:Yes.mikeh Wrote:studiosi Wrote:I did a fork at github to solve some problems with the links... i don't know if the pull request is done, but... check it in my fork if it is not integrated. Check the generated HTML and tweak blog.php if needed... i think that a template system would be a great add on to this project... which is really good work anyways... GS Blog v1.4 - shawn_a - 2012-06-01 mikeh Wrote:shawn_a Wrote:Yes.mikeh Wrote:I have incorporated your changes into version 1.1.4. Thank you for your contribution. Thanks! yay, now I can play around with it more. Havent been able to use it. GS Blog v1.4 - Oleg06 - 2012-06-01 1. reason categories in Russian language in the admin are shown as # # # # # # # 2. Archives in the sidebar looks like this ��� 2012 GS Blog v1.4 - kidata - 2012-06-01 Check out the German language file at: https://github.com/kidata/getsimple-blog/blob/master/blog/lang/de_DE.php Any improvements welcome. GS Blog v1.4 - mikeh - 2012-06-02 kidata Wrote:Check out the German language file at:I have added it to the extend. Thanks! GS Blog v1.4 - Angryboy - 2012-06-02 mikeh Wrote:Thank you for your input. I have incorporated some of your changes into the newest version (pretty urls and label fixes).Thank you for considering the points :-) Hope you do fantastically and provide support for this blogging system when it is fully released! GS Blog v1.4 - wolklesnoy - 2012-06-02 I do the translation into Russian. in case of a category choice instead of letters ##### http://postimage.org/image/ho4yhkerj/ GS Blog v1.4 - mikeh - 2012-06-02 Version 1.1.5 Added To Extend
Version 1.1.7 will include a "written by authorname" under each post (displayed optionally). If chosen to be displayed it will either place the username of the admin who wrote the post, or if the newest version of the multi-user plugin is installed, you can choose a name for each admin. It will also include "Authors" page (only will exist if newest version of multiuser is installed), which will display all authors (and their bios) who have written posts for the blog. |