Posts: 25
Threads: 1
Joined: Jan 2011
mvlcek Wrote:allienato Wrote:no luck even if I increase memory limit up to 64/128M, maximum execution time always exceed :\
Just tried it myself - this produced an infinite recursion :-(
If you are lucky and I18N Gallery executes after News Manager, it should work without the described patch.
But if you want to make sure:
The line in site.php/nm_show_post should be:
Code: if ($excerpt) $content = nm_create_excerpt($content); else $content = exec_filter('content',$content);
The additional function nm_get_post as described in your post must be added to site.php, too.
Additionally add the following lines to the beginning of news_manager.php/nm_site to prevent recursion:
Code: global $nm_in_filter;
if (@$nm_in_filter) return $content;
$nm_in_filter = true;
The code in the template should be:
Code: <?php
$page = return_page_slug();
if($page == 'nm' && isset($_GET['post'])) {
$newscontent = nm_get_post(@$_GET['post']);
get_i18n_gallery_header_from_content($newscontent);
}
?>
That's it, quick and dirty.
thank you, it works!
even if the news title now shows under the content, along with other elements like date and back button (including .nm_post div and so forth).
I guess I should build another function to get those values.
Or maybe return them within nm_get_post custom function?
* meanwhile I found an alternative way, that works (in my case) also in general news page, without 'post' variable:
- in nm_show_post
Code: <div class="nm_post_content">
<?php echo $content; ?>
<?php if (file_exists(GSDATAPATH . 'i18n_gallery/' . $slug . '.xml')) {
get_i18n_gallery($slug);
echo '<br/>';
}
?>
</div>
- in the template
Code: <?php if($page == 'news') {
$newscontent = nm_get_post(@$_GET['post']);
get_i18n_gallery_header_from_content($newscontent);
?>
note: gallery always shows up after the content, as you can see
Posts: 25
Threads: 1
Joined: Jan 2011
patriotmedia Wrote:Has anyone been able to have 2 versions of this plugin run simultaneously on one site? I've got two sections of a website that need different news - one in a public area and one in a customer support area. I'm thinking I could rename a bunch of items across the plugin, but was curious to see if someone has implemented this already.
y, I've successfully implemented two versions in the same site.
Check this post: http://get-simple.info/forum/post/15525/#p15525
and a reply.. Quote:@jarno1982: you're right that the duplicate plugin reads from the same DB. To fix this, change NMPOSTPATH, NMSETTINGS, etc. i.e., have them point to a different location/file.
Posts: 1,204
Threads: 30
Joined: Jun 2010
I did it once in an older NM version, but now it seems that I cannot remind myself where did I make changes to make custom link structure working (%parent%/%slug%) and having
website/news/slug URI instead of website/news/post/slug
I remember only that I did some changes in url creation function, but in latest version it has changed a bit.
Did anyone succeed in shortening the urls in latest NM version ?
Addons: blue business theme, Online Visitors, Notepad
Posts: 11
Threads: 1
Joined: Nov 2011
I have just started using get-simple, and I like it quite a bit. I have a question about this plugin as the help page is giving me a 403 Forbidden.
I want to have a news page that has 3 different sections:
1. "subscribe to newsletter" section (this is no problem, I have already made it work)
2. "Latest news" section, with the 3 last news stories
3. "Current news" section with the content of the last posted news story
When I click on a story in (2) I want it to appear in (3). Is this possible with this plugin?
Furthermore, I don't have components on my site, I only use get_page_content() to fetch the HTML content. How, then, can I place the news items into a specific place on my page (in a specific <div> or <section>? Right now the News Manager plugin seems to overwrite the regular content on the news page I have set up.
I hope I can still use the plugin
Posts: 2,928
Threads: 195
Joined: Feb 2011
Quote:Furthermore, I don't have components on my site, I only use get_page_content() to fetch the HTML content.
why do you do this? The content belongs into the pages, no need to get it with a component
Posts: 11
Threads: 1
Joined: Nov 2011
Connie Wrote:why do you do this? The content belongs into the pages, no need to get it with a component
I'm not sure I understand your question. I have a header.php, template.php, and footer.php. The template.php file contains some HTML, and then calls get_page_content() to insert the HTML I place in the page editor.
I am using the 960 grid system for my page and so I don't really have components like sidebars etc that are the same on every page. I heard that I can make a new component called e.g. "news", and then import that component into a page using {% news %} using the dynamic page plugin. Will that solve my problem here?
Posts: 44
Threads: 3
Joined: Oct 2011
Is there anyone who has succeeded in the sidebar.php also display the date?
Posts: 44
Threads: 3
Joined: Oct 2011
Quote:I just tested this out and accomplished it with 2 small edits to "news_manager/inc/functions.php" and "news_manager/inc/site.php". Below are my edits and the edited files are attatched to this post (ver: 2.2.4).
File: news_manager/inc/site.php : Around Line 99
Change
Code: if ($excerpt) $content = nm_create_excerpt($content);
to
Code: if ($excerpt) $content = nm_create_excerpt($content, $url);
File: news_manager/inc/functions.php : Around Line 151-153
Change
Code: $content = trim(mb_substr($content, 0, $len, 'UTF-8')) . ' [...]';
else
$content = trim(substr($content, 0, $len)) . ' [...]';
to
Code: $content = trim(mb_substr($content, 0, $len, 'UTF-8')) . '.. <a href="'.$url.'">Read More</a>';
else
$content = trim(substr($content, 0, $len)) . '.. <a href="'.$url.'">Read More</a>';
It is not working for me, i use news manager 2.2.4 and the newest get simple.
Posts: 44
Threads: 3
Joined: Oct 2011
I've made some adjustments that apply to me.
In the sidebar you normally see only the title of the news item. I wanted to have the data to and align on the right.
following the addition in sidebar.php
Code: function nm_list_recent_news() {
global $NMRECENTPOSTS;
$posts = nm_get_posts();
if (!empty($posts)) {
echo '<ul>';
$posts = array_slice($posts, 0, $NMRECENTPOSTS, true);
foreach ($posts as $post) {
$url = nm_get_url('post') . $post->slug;
$title = strip_tags(strip_decode($post->title));
$date = nm_get_date(i18n_r('news_manager/DATE_FORMAT'), strtotime($post->date));
echo "<li><a href=\"$url\">$title</a></li>";
?>
<div class="div-nieuws-data"><?php echo $date; ?>
</div><?php
}
echo '</ul>';
}
}
All you have to do is adjust your css. Add "div-news-data" in your css and customize it to your needs.
Maybe you could use this info
Posts: 15
Threads: 0
Joined: Nov 2011
Hello,
How can I display these nm_list_archives, nm_search on the news page only ( http://domain.tld/news) I've put those on template.php but it display on other pages also, tried to put those on plugins/news_manager/inc/site.php but it got weird looking turns out every news has those elements.
help, anyone?
Posts: 2,928
Threads: 195
Joined: Feb 2011
one way would be to create a special template for the news page
another way could be a conditional in the template (if page == news .....)
the first way is easier
Cheers, Connie
Posts: 15
Threads: 0
Joined: Nov 2011
Connie Wrote:one way would be to create a special template for the news page
another way could be a conditional in the template (if page == news .....)
the first way is easier
Cheers, Connie
I'll create special template then, do you know where to styling the output news, I can't find the css file, am I missing something?
Posts: 184
Threads: 20
Joined: Apr 2010
i18 Galleries inside Posts.
I followed the previous posts to integrate i18 galleries within the news manager posts but they either crashed my local xampp server or plain didn't work. The previous posts are broken in bits and pieces and seem to be all over the place.
Can you please put the entire set of instructions in one place for an easier understanding and implementation?
Posts: 2,928
Threads: 195
Joined: Feb 2011
SG Wrote:I'll create special template then, do you know where to styling the output news, I can't find the css file, am I missing something? we did this in the standard-css of get-simple.de:
Code: /* Standard-Styles vom Newsmanager fürs Innovation-Theme */
.nm_post { padding: 0; margin-bottom: 50px; }
.nm_post h3 { margin-bottom: 5px; }
.nm_post p { margin-bottom: 10px; }
.nm_post_title a { text-decoration: none; }
.nm_post_title a:hover { text-decoration: underline; }
.nm_post_date { color: #999; font-size: 11px; }
.nm_post_content { margin-bottom: 20px; }
.nm_post_meta { padding: 2px 5px; border: 1px solid #ccc; background-color: #f9f9f9; font-size: 11px; }
.nm_post_back { margin-top: 20px; font-size: 11px; }
.nm_post_back a { text-decoration: none; }
.nm_post_back a:hover { text-decoration: underline; }
.nm_page_nav .left { float: left; text-align: left; }
.nm_page_nav .right { float: right; text-align: right; }
if you check the output, you will see that the css-elements of newsmanager have the prefix nm_
so you can define that in your standard style-sheet
Posts: 15
Threads: 0
Joined: Nov 2011
Ok, so I've manually check the html output too, thanks @Connie !
Has anyone tried adding facebook comments on post? I've tried this applied the facebook comments tag on site.php
Code: <div class="nm_post">
<h3 class="nm_post_title">
<a href="<?php echo $url; ?>"><?php echo $title; ?></a>
</h3>
<div class="nm_post_date"><?php echo i18n_r('news_manager/PUBLISHED') . " $date"; ?></div>
<div class="nm_post_content"><?php echo $content; ?>
<div class="fb-comments" data-href="http://localhost:8888/getsimple/news/" data-num-posts="5" data-width="960" data-colorscheme="dark"></div>
</div>
Works, but it also shows on the excerpt news http://cl.ly/C47n , is it possible for the comment to only available on specific news post http://cl.ly/C5Ip ?
Posts: 8
Threads: 1
Joined: Nov 2011
i have a problem, i install the plugin and work ok, but when clic in the title of any news its open a url http://www.consultoriacodipro.com/notici...t/noticia3
Oops! Page not found!
We are sorry, but the page you are looking for does not exist.
in resume cant open any news all say page not found...
ty
Posts: 2,928
Threads: 195
Joined: Feb 2011
pipila,
this is a problem with the mod_rewrite
If I remember well, to use the news-manager with friendly URLs you have to add some lines of code to .htaccess
did you do this?
switch off "Use Fancy URLs for posts, archives, etc. -" is it working?
if so, the .htaccess-file is not modified to work with the news manager
Cheers, Connie
Posts: 8
Threads: 1
Joined: Nov 2011
hi connie tks, you rigth, works with not fancy urls, but i did edit the .htacces file, and paste the instrucction (the same plugin givme) and upload the file under news plugin folder...
what is wrong?...
ty
Posts: 1,204
Threads: 30
Joined: Jun 2010
pipila Wrote:and upload the file under news plugin folder...
what is wrong?...
Edit .htaccess file in GS root directory (where stays gsconfig.php file), and add there rewrite rules given by newsmanager.
Addons: blue business theme, Online Visitors, Notepad
Posts: 149
Threads: 8
Joined: Dec 2011
Just installed the latest version of newsmanager (used as a blog) on the site I am currently working on and noticed that no html formatting is used for the excerpts.
Which to be quite honest results in odd looking excerpts really.
Is there any way to have the excerpts also show the html formatting?
Posts: 2,928
Threads: 195
Joined: Feb 2011
maybe this html-less formatting is adapted from the "usual excerpt handling" (WordPress), there I miss the formatting also ;=)
It would be good to keep formatting, I support that request also
Posts: 11
Threads: 1
Joined: Nov 2011
I have a new language file to submit, where should I do this?
Posts: 11
Threads: 0
Joined: Dec 2011
I am using this sidebar snippet to display the latest post on my homepage.
<?php nm_list_recent(); ?>
But it only shows 1 story. Is there a way to make it display more?
thanks
Posts: 44
Threads: 3
Joined: Oct 2011
mantra Wrote:I am using this sidebar snippet to display the latest post on my homepage.
<?php nm_list_recent(); ?>
But it only shows 1 story. Is there a way to make it display more?
thanks
Search in the code for $limit and change it to wat you want
Posts: 11
Threads: 0
Joined: Dec 2011
thanks for getting back, but did a search through the entire news manager folder for $limit and it didn;t fid it in any files
any idea where it should be?
|