2020-02-01, 00:57:14
News Manager (updated)
|
(2020-02-01, 00:57:14)Carlos Wrote: Similar/related posts in News Manager hello Carlos, your solution is nice! I read info in that page. I think it is good for me:
Code: <?php if (nm_is_single()) { get_component('nm-similar-posts'); } ?> But ...a question: but what is the template file? name? I'm using "closest" theme http://get-simple.info/extend/theme/closest/1195/ in the zip, there is this css/style.css see here https://filebin.net/zckjn5c9e9q6bdp4/sty...t=7k7apic5 i must put code in css/style.css file? or in this another file "template.php" https://filebin.net/yzc5mmsws0u6ydub/tem...t=xpjzpypm ???
2020-02-02, 00:51:02
template.php
Hello,
thank you for this great plugin : Here are some of my parameters : markupTitle h2 tagSeparator , showFields title,image,content READ_MORE "Lire l'annonce" NOT_EXIST "L'annonce demandée n'existe pas ou a été retirée." componentBottomPost bottompost I display the posts in a page called "annonces" and was able to obtain an interesting look and feel. Only one thing is would it be possible to have target="_blank" on these page for posts ? Question : Is there a way to do this ?? -------- Let me share some code using Newmanager and Newsmanager addon + dynpages than can be useful and help someone : #Display of <?php global $args; ?> <?php nm_set_custom_maxposts($args[0]); ?> <?php nm_set_custom_image(190, 190); ?> <?php nm_set_custom_excerpt(200); ?> <?php nm_custom_display_recent(' <h2><a target="_blank" href="{{ post_link }}">{{ post_title }}</a></h2> <div style="display: grid;grid-template-columns: 200px 1fr"> <div><a target="_blank" href="{{ post_link }}"><img style="float: left;margin: 0 15px 0 0;" href="{{ post_title }}" src="{{ post_image_url }}" alt="{{ post_title }}"></a></div><div><span><bold>Annonce :</bold> {{ post_excerpt }}... <a target="_blank" href="{{ post_link }}">Lire l\'annonce</a></span></div></div>',$args[1]); ?> I can put this function in a component named display. Displays $args[1] posts from category $args[0] in a grid. You can put in a component and make a call in a page. My way of using News Manager is as is : I use only _tags so I can control how they display (invisible tags). For each tag (example _barcelona) I create, I will also create a static normal page with slug barcelona. I am using this page like a category or tag page in Wordpress. This is good because on the static page I can put a lot of content for seo and write a really good article. Then anywhere I want in the article, i make calls to a component like Let's say i am displaying real estate listings in my barcelona page : I will just add somewhere {% display _barcelona 10 %} This is a great way for me to mix static and dynamic content to help the posts rank. Also, I want to have the posts link back to the "barcelona" static page : here are my settings for doing so from the post page. showFields title,image,content componentBottomPost bottompost I do not display tags on the post page but call a component i named bottompost. Here is this component : <?php global $nmdata; if (count($nmdata['tags'])>0) { echo "<p>Apartment "; for ($tempvariable=0; $tempvariable<count($nmdata['tags']); $tempvariable++) { $temptag = $nmdata['tags'][$tempvariable]; $temptag = str_replace("_", "", $temptag); $temptag = str_replace("-", "", $temptag); $tempdisplay = ucwords($temptag); $tempurl = get_site_url(false).$temptag; //echo "tempdisplay : ".$tempdisplay."<br>"; //echo "tempurl : ".$tempurl."<br>"; echo "<a href=\"$tempurl\" target=\"_blank\">$tempdisplay</a> "; } echo "</p>"; } ?> simply, it will get the tags of the post and find _barcelona, transform it in barcelona and make a link to mywebsite.com/barcelona with anchor "Barcelona". I do like this for all my tags. So one tag = one static page. The good thing is that like this I can work meta title, h1 and general seo of this page the way I want. ALso for posts, if you do it for seo, don't forget to use nm_title to have a good different seo title for each post and a different canonnical url too ! I find it very interesting to use in my content. For instance, if I write an article "5 reasons why you should consider buying a property in Barcelona". I can make my article : introduction <h2>reason 1</h2> reason1_text insertion of a post with my last property end of reason1_text <h2>reason 2</h2> ... If i make another component with changes of how it is displayed, it will look great in the content and very natural. Also if I use the nm_set_custom_offset($offset) i will make sure to not display the same listing and i can through this page display my 5 last listings wit the right offset. ----- this is how i am using right now. Let's imagine I have a tag _luxury and my apartments are in Madrid, Barcelona and Bilbao. I will create a page with slug "luxury" etc. Is there a possibility now to have a search like : luxury and madrid for instance ? @Carlos If I can do that then everything is perfect . Thanks, Pablito
Hello Carlos,
i hope maybe you can help me with my 2 questions : 1) Would it be possible to have target="_blank" on these page for posts ? 2) Can we use combination of two tags ? Thanks in advance for everything you do to maintain this project. 3) another feature I would like would be a plugin to change everyday the date of the last post to make a rotation (it can make sense sometimes). Is there a way to order such a plug in ?
2020-05-07, 22:41:46
How to solve pagination canonical for main new url :
go to newsmanager/inc/site.php function nm_fix_get_header_full($function='get_header', $param2=null) { // TODO: paginated, etc. $canonical = false; if (nm_is_single()) $canonical = nm_post_url(false); elseif (nm_is_tag()) $canonical = nm_get_url('tag').rawurlencode(nm_single_tag_title('','',false)); elseif (nm_is_archive()) $canonical = nm_get_url('archive').intval($_GET[NMPARAMARCHIVE]); elseif (nm_is_main() && intval($_GET[NMPARAMPAGE])>0) { $canonical = nm_get_url('page').intval($_GET[NMPARAMPAGE]); } if ($canonical) { $function(false, $param2); echo '<link rel="canonical" href="',$canonical,'" />',"\n"; } else { $function(true, $param2); } } We need to update this function wit a little fix. We see there is a work in progress about canonical. function nm_fix_get_header_full($function='get_header', $param2=null) { // TODO: paginated, etc. $canonical = false; if (nm_is_single()) $canonical = nm_post_url(false); elseif (nm_is_tag()) $canonical = nm_get_url('tag').rawurlencode(nm_single_tag_title('','',false)); elseif (nm_is_archive()) $canonical = nm_get_url('archive').intval($_GET[NMPARAMARCHIVE]); elseif (nm_is_main() && intval($_GET[NMPARAMPAGE])>0) $canonical = nm_get_url('page').intval($_GET[NMPARAMPAGE]); if ($canonical) { $function(false, $param2); echo '<link rel="canonical" href="',$canonical,'" />',"\n"; } else { $function(true, $param2); } } ------ The modif is : elseif (nm_is_main() && intval($_GET[NMPARAMPAGE])>0) $canonical = nm_get_url('page').intval($_GET[NMPARAMPAGE]);
For seo, a change on site.php :
// patch for <title> tag - single post or tag view function nm_update_page_title() { global $title, $nmpagetitle, $nmdata; $nmpagetitle = false; if (nm_is_site() && nm_get_option('titletag',true) && !function_exists('nmt_set_gstitle')) { if (nm_is_single()) { $tempdisplaytags = ""; for ($tempvariable=0; $tempvariable<count($nmdata['tags']); $tempvariable++) { $temptag = $nmdata['tags'][$tempvariable]; $temptag = str_replace("_", "", $temptag); $temptag = str_replace("-", "", $temptag); $tempdisplay = ucwords($temptag); $tempdisplaytags = $tempdisplaytags . " " . $tempdisplay; } $nmpagetitle = $title; $title = nm_post_title('', ' - '.$title . $tempdisplaytags, false); } elseif (nm_is_tag()) { $nmpagetitle = $title; $title = nm_single_tag_title('', ' - '.$title, false); } } } Search for this function and update like this. Your tags will be include in the meta title of the page of each post providing a better seo. Modify the position like you want.
2020-06-02, 01:40:35
Hi Carlos, don't know if this has been already worked out :
it is about url image post news manager updated version. For me, it does not work when i paste URL directly in the "image" field under "post options" (without using "select file" button) Is it normal ?
2020-06-02, 06:07:15
Enable external images with
imageExternal 1 in NM Custom Settings.
2020-06-02, 18:09:27
(2020-02-01, 00:57:14)Carlos Wrote: Similar/related posts in News Manager How to change date format in that snippet?. I use .$post->date. which gives Sun, 19 Jul 2020 11:05:12 +0200 but i want simple 12.7.2020 or something similar .
2020-07-21, 18:42:42
what about date('d.m.Y', strtotime($post->date)); ?
(2018-12-11, 05:51:38)Carlos Wrote:(2018-11-15, 16:37:10)krlllo Wrote: Hello, guys! Automatic deletion of the news after a certain period of time would be good, like when u write new u can set time until it will be completely deletet . How to get "main" url?, i mean main news index page url if u dont know the main news slug?.
2020-08-27, 09:40:53
(This post was last modified: 2020-09-01, 00:23:07 by judgedredd.)
I have just downloaded the News Manager (Updated) plugin and uploaded it to the plugins folder as per the instructions.
I found that the plugin did NOT appear in the plugins tab. I logged out, logged back in, refreshed the page, emptied the browser cache, re-logged back in and ..... nothing. News Manager (Updated) not showing in the plugins tab. I then tried installing the folders/files in the root of the plugins folder instead of uploading the plugin into its own folder. Still nothing. I have attached a screenshot of the plugins folder on my server. [attachment=1390] In the image above, the folders on the right are are as follows: anonymous_data - plugin folder browser - from News Manager plugin folder inc - from News Manager plugin folder InnovationPlugin - plugin folder lang - from News Manager plugin folder NewsManager - News Manager (Updated) plugin folder template - from News Manager plugin folder What do I need to do to get everything to work? I have added the .htaccess code for this plugin into the .htaccess file in the root of the CMS folder instead of the plugins folder, seeing as the code was nearly identical to the original .htaccess file. The version of PHP on my server is 7.2 Version of Get Simple is 3.3.16 Server has the LAMP stack Site address is http://theforensicnurse.org (GetSimple folder is under /cms) News Manager (updated) Plugin is the latest version Two default plugins already installed (came with the GS download) and showing in the plugins tab Deactivated and re-activated the two default plugins withpout any problems
2020-08-27, 15:46:38
(This post was last modified: 2020-08-28, 00:14:08 by judgedredd.)
I re-uploaded the folder after seeing somewhere that I wasn't doing it right. So here is what the on-server plugins folder looks like now:
[attachment=1391] The plugins tab is STILL not showing the News Manager plugin in the list. HELP!!!
Hi Carlos. Tell me why your search looks for hyphens, but Martin Vlcek's search doesn't look for them?
http://newsmanager.getsimplecms.ru/novosti/
2020-08-28, 01:05:09
I went into the website health check area of the backend and discovered errors:
[attachment=1393] But when I went into my server to change the permissions I discovered that they were correct: [attachment=1394] and [attachment=1395] next image in next post
2020-08-28, 01:06:11
(This post was last modified: 2020-09-20, 09:08:24 by judgedredd.)
[attachment=1396]
The image above is the permissions on the users folder. I also checked the permissions on the cms/data folder and it is 0755 too. So what is going on? This has now been resolved by calling the hosting company and having them change the permissions on the folders. As to the lack of images, I had to delete all attachments to post a new one in a new post.
2020-09-20, 00:58:52
Hi, i haven't yet found anything about this:
I would like to mimic the behavior of this plugin, http://get-simple.info/extend/plugin/def...ntent/311/ But working for new post creation, How to please?
2020-09-20, 06:54:16
Hi,
Did you go through the plugin thread to find an answer ? http://get-simple.info/forums/showthread.php?tid=2712
2020-09-20, 20:48:30
(2020-09-20, 06:54:16)Felix Wrote: Hi, Hi Felix, this does not help me, because what i need is to have default content with NEWS MANAGER! This is why i ask how to mimic this behavior for New Posts. Do you have any idea please ?
2020-09-25, 20:35:39
finally i rather use a slug of my choice and just clone, without news manager.
it is just fine.
2020-09-28, 14:35:55
I haven't been able to get a sitemap from News Manager.
Does anybody know how to make it work? I even installed News Manager 3.7 beta version, have tried all the versions I could get and none of them seems to trigger the sitemap generation.
2020-10-07, 03:25:18
My news written with news manager 3.6 are not added to sitemap.xml. Why not? Where can i start to look for the reason?
Alex |
« Next Oldest | Next Newest »
|
Users browsing this thread: 8 Guest(s)