News Manager (updated) - 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: News Manager (updated) (/showthread.php?tid=3972) |
RE: News Manager (updated) - D.O. - 2013-12-16 My humble smart contribution to your masterpiece! =D (2013-12-06, 01:24:31)Carlos Wrote: [quote='newdeepdan' pid='41533' dateline='1386177985'] D.O. posted a tip, a way to do this (if I have understood well) Code: <?php RE: News Manager (updated) - ochsadad - 2013-12-22 <h3> styling for Title I'm using News Manager 2.5 beta 14. My posts (in the browser "View Source") show <h3> style for the Titles. In version 2.4.4 this style came from the file site.php and was easy to change to <h5>. However in 2.5 beta 14 I cannot find any reference to <h3>. Where is this style coming from? Quote:From browser view source: RE: News Manager (updated) - D.O. - 2013-12-22 Hi ochsadad! Well, I checked it and it is still there. You can still find the tag <h3> in site.php file. RE: News Manager (updated) - ochsadad - 2013-12-22 (2013-12-22, 03:43:30)D.O. Wrote: Hi ochsadad! Thanks for your response! In the print post data section of site.php, I find the following: # print post data ?> <<?php echo $nmoption['markuppost']; ?> class="nm_post<?php if ($nmoption['pagetype'] == 'single') echo ' nm_post_single'; ?>"> <<?php echo $nmoption['markuptitle']; ?> class="nm_post_title"><?php if ($nmoption['titlelink']) echo '<a href="',$url,'">',$title,'</a>'; else echo $title; ?> The <h3> tag is not there (where it used to be). I do not find it anywhere in the file. RE: News Manager (updated) - D.O. - 2013-12-22 Well if u use the version 2.4.4 you have to change the line "<h3 class="nm_post_title">" in (example) "<h5 class="nm_post_title"> instead the versione 2.5.14 beta use the option "markuptitle" to do it... Take a look at Carlo's personal website http://www.cyberiada.org/cnb/news-manager/blog/?post=news-manager-25-beta-14 Thanks for your response! In the print post data section of site.php, I find the following: # print post data ?> <<?php echo $nmoption['markuppost']; ?> class="nm_post<?php if ($nmoption['pagetype'] == 'single') echo ' nm_post_single'; ?>"> <<?php echo $nmoption['markuptitle']; ?> class="nm_post_title"><?php if ($nmoption['titlelink']) echo '<a href="',$url,'">',$title,'</a>'; else echo $title; ?> The <h3> tag is not there (where it used to be). I do not find it anywhere in the file. [/quote] RE: News Manager (updated) - TeeJay - 2013-12-22 (2013-12-22, 03:36:15)ochsadad Wrote: <h3> styling for Title Just open the News Manager settings, allow custom settings and add the following to the textarea that will appear Code: # Change of heading levels The first one sets titles to h2 generally and the second with "single" sets h1 for full articles only. You can change these h2 and h1 to whatever you want. RE: News Manager (updated) - Carlos - 2013-12-22 @ochsadad My News Manager clone's beta version code is getting a bit more complicated to patch (the original was quite clean and understandable), but hopefully most of those patches will no longer be necessary with the new options and custom settings. D.O. and TeeJay have already told you about the new custom setting markuptitle... so if you want to use <h5> in every news page: Code: markuptitle h5 I'll try to make some decent docs for these new features before releasing the stable version. (In the meantime, don't hesitate to ask any "How do I ...") Curious, are you doing other patches besides this one? RE: News Manager (updated) - D.O. - 2013-12-22 Hi Carlos, yes I know markuptitle as u can see, I advised to Ochsadad your new option markuptitle and sent it your website.. At the moment I am not using ur beta version with Partenope.org but I suppose that I have to update it as soon as possible tho I modified NM because I needed the date and the tags on the same line (yes another patch). It could be great to create an option for this... and I am glad you added thee function nm_tag_list... I am still using mine :-P but I think it's time to update it with yours. Read YOu later bro! RE: News Manager (updated) - ochsadad - 2013-12-23 @Carlos Thanks to you, D.O., and TeeJay for your assistance. Your solution is much easier and more elegant than modifying the code. RE: News Manager (updated) - D.O. - 2013-12-23 Too Kind, Ochsadad, tho I think only Carlos deserves a big THANKS from all of us His work with NewsManager is superb. (2013-12-23, 04:10:09)ochsadad Wrote: @Carlos RE: News Manager (updated) - ochsadad - 2013-12-23 (2013-12-22, 07:38:22)Carlos Wrote: @ochsadad Carlos, I've patched site.php to put the date and title on the same line. Quote:<<?php echo $nmoption['markuptitle']; ?> class="nm_post_title"><?php My "news" page is my home page: http://www.lbqa.org Thanks, again! RE: News Manager (updated) - D.O. - 2013-12-23 Great Site! The template is by Timbow cool! it's even responsive! (2013-12-23, 05:10:48)ochsadad Wrote: [quote='Carlos' pid='41777' dateline='1387661902'] RE: News Manager (updated) - Craziwolf - 2013-12-23 I have been racking my brains trying to figure it out but am coming up short. At the moment I am using news manager but would like to display static content above it. So far I have been un successful and would like some suggestions on how I might achieve this? RE: News Manager (updated) - D.O. - 2013-12-23 What do you mean? Do you want to show in the same page a (e.g.) static content before of your news? (2013-12-23, 14:13:55)Craziwolf Wrote: I have been racking my brains trying to figure it out but am coming up short. At the moment I am using news manager but would like to display static content above it. So far I have been un successful and would like some suggestions on how I might achieve this? RE: News Manager (updated) - TeeJay - 2013-12-23 (2013-12-23, 14:13:55)Craziwolf Wrote: I have been racking my brains trying to figure it out but am coming up short. At the moment I am using news manager but would like to display static content above it. So far I have been un successful and would like some suggestions on how I might achieve this? I think I can tell you how to Let's say you have page in GS called 'News'. In GS, you can set a template the page will use.
One thing to make it easier for you is that instead of creating a brand new template, you can just add the content to your global template (template.php), but you have to wrap the static content between Code: <?php if (return_page_slug()=='news') { ?> and <?php } ?> This is what you have to do if you use the latest stable version. However, there is a trouble about it - it will be shown not only above the list of the posts (main news page, 'News'), but also above each post when you click it. If you want to to fix this, I think you have to use latest beta (a few posts above). I use it on a live site, see my signature, you don't have to worry. For the beta, solution is much easier as there are special functions that can make your life easier:
Don't forget to place it properly in the code. In most cases, it should be directly above the <?php get_page_content(); ?> tag. In case you're using beta and you want to show the same static content above both the main news page and all the posts, you can use the solution with the "slug condition", or just join these two functions (nm_is_single(), nm_is_main()) with logical OR. Hope this is the answer you were looking for RE: News Manager (updated) - Carlos - 2013-12-24 This is how I may do it - code to be inserted in your template, somewhere above the get_page_content() tag) News Manager until 2.4.x: PHP Code: <?php NM 2.5 beta (current): PHP Code: <?php if (nm_is_home()) { ?> These would be for displaying that content only in the main news page (not in secondary pages, archives, tag view...). Other possibilities would require different conditionals (nm_is_main, nm_is_site, ... in 2.5 beta) Of course, there are several ways to do it, as you can see in TeeJay's previous post. RE: News Manager (updated) - D.O. - 2013-12-24 Hey Carlos, I am astounded! I was gonna post one of my old tips like... PHP Code: <?php ...But your new NM 2.5 ROCKS for REAL.. I have to renew my site with your new NM functions! RE: News Manager (updated) - Carlos - 2014-01-02 News Manager 2.5 beta 15 attached to this post. New custom settings: - imageclass - imagesize - excerptlength - showfields (@D.O., @ochsadad) - componentbottompost - componentafterpost imageclass Lets you set a custom class for post images. For example, if you use Bootstrap or Skeleton (or nickpack/Ribs) you can add class "scale-with-grid" to make post images responsive: Code: imageclass scale-with-grid imagesize Lets you customize width, height and cropping of post images overriding your normal settings. Parameters separated by commas and/or spaces; 0 or full for original image. (it's just a shorthand for imagewidth, imageheight and imagecrop) For example, if you want full images in single post view, and cropped 90x90 images in archives: Code: single imagesize full excerptlength Lets you customize the excerpt length, overriding the one defined in NM settings. Can be used to e.g. have shorter excerpts in archives, etc. showfields Allows simple customization of post layout. You can specify what fields to display in the order you wish. Fields can be separated by comma and/or blanks. Default is title,date,author,image,content,tags (author and image are not used by default - only displayed if they are enabled) componentbottompost You can specify a GS component to be rendered in the bottom of the post (before its container's closing tag - div by default) componentafterpost You can specify a GS component to be displayed after the post These last two component-related settings can be useful for e.g. integrating external comment support. This is how I'm doing to have disqus comments in my site's NM blog: - I uploaded and activated the External Commenting plugin. - I created a component named post-comments with this content: PHP Code: <?php - I added this to my Custom Settings: Code: single componentafterpost post-comments (For the already existing custom settings in 2.5 betas, see: What was new in beta 13, beta 14) Please report any issues or bugs you find. [attachment removed: news_manager-2.5-beta15.zip (Size: 70.92 KB / Downloads: 42) ] RE: News Manager (updated) - D.O. - 2014-01-03 You are Great, Carlos! I have to test it absolutely now! RE: News Manager (updated) - Carlos - 2014-01-04 If anyone is interested in integrating the External Commenting plugin with the News Manager (updated) stable version (2.3.x and up) I can post here a small snippet to be inserted in your template or a component. (There already was some solution for this in an old thread, but AFAIR it required patching the plugin.) RE: News Manager (updated) - TeeJay - 2014-01-04 Thanks for the new beta, works great as expected I have just implemented cumbe's beta of Pages & Comments when redesigning my website and I was wondering how to put facebook likes after the post but before the comments - these components are exactly what I needed and I guess I'm not alone (yes, finally I got rid of external commenting system and got cumbe's beta also into News Manager). I'm gonna implement Google authorship for my website, so I will also need an author's box. The author's paragraph or span or whatever it is now is not enough, I will need a whole div with a photo and longer text and some links to social sites, these components can serve me for this also perfectly. But maybe - I don't know, just a sudden thought, it might be good to make some space in NM setting for such author's box HTML code after clicking onto a checkbox... maybe it would make the settings more complicated, it's not really necessary as components are the same just at a different spot, but you decide RE: News Manager (updated) - Carlos - 2014-01-06 Thanks for testing and reporting. If your site is one-author, I suppose you can just put your Google authorship code in a component or in the template. This is how I intend to enhance the (currently very basic) author support in the beta version: - add some function to display/return the post author (or for use in conditionals) - allow setting aliases for authors (e.g. to show user name "jsmith" as "John Smith", "admin" as "Administrator", ...) probably in an array in gsconfig. But no new backend settings for now. RE: News Manager (updated) - Riianna - 2014-01-08 Add news categories function and snippet to show recent news from specifig category RE: News Manager (updated) - D.O. - 2014-01-08 Carlos, this "Alias" option is wonder. I bet you made it for me :-D Gracias again! (2014-01-06, 02:41:16)Carlos Wrote: Thanks for testing and reporting. RE: News Manager (updated) - D.O. - 2014-01-08 Hi Riianna, for showing recent news from specifig category I used News Manager Addons by Carlos for a site and it works wonderfully. e.g. PHP Code: <?php nm_list_recent_by_tag('good-news',4); ?> But I dunno if nm_list_recent_by_tag will work again with the new NM version I will reply later and will let you know. (2014-01-08, 10:13:54)Riianna Wrote: Add news categories function and snippet to show recent news from specifig category |