Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
Hi Carlos, I've searched all of the forums but haven't found a definitive answer... Is there any way to integrate the Custom Title plugin (Custom Title) with News Manager? I don't want to use the Post Title as the Page Title, I would like to have a completely unique page title for post just like I do with every other page in my site. Currently, the Custom Title field doesn't display inside the post options when editing/creating a post. Any help you can offer would be most appreciated.
Reply
Hello,

is there a way to make custom headlines (h1 in my case) for tag pages instead of the standard blog page headline? I would like to have "Topic: Tag" instead of "Blog" as a headline on tag pages. The page title is individual, so perhaps there is a solution for headlines, too?

Thank you
Hypertexter
Reply
(2017-06-23, 17:45:41)Hypertexter Wrote: is there a way to make custom headlines (h1 in my case) for tag pages instead of the standard blog page headline? I would like to have "Topic: Tag" instead of "Blog" as a headline on tag pages. The page title is individual, so perhaps there is a solution for headlines, too?

Since NM 3.1 you can use function nm_single_tag_title($prefix, $suffix, $echo), e.g.:

Code:
<?php nm_single_tag_title('Tag: '); ?>

In your case you may replace <?php get_page_title(); ?> by:
Code:
<?php nm_single_tag_title('Topic: ') or get_page_title(); ?>
Reply
Sad 
Hi Carlos,

looks interesting, but my template.php is a little bit sophisticated:

PHP Code:
<?php if (return_page_slug() == "blog") { ?>
                        <h1><a href="<?php echo find_url("blog"""); ?>"><?php if (!nm_is_single()) get_page_title(); ?></a></h1><?php 
                    else 
                    
?><h1><?php echo html_entity_decode(get_page_title(false)); ?></h1><?php ?>

to have a URL-title on blog page and no h1 on single post pages. So I fail to integrate your proposal for tag pages. [Image: sad.gif]

Could you perhaps show me how to do it?

Thank you,
Hypertexter
Reply
@bensayers

No, I'm afraid there's no way to integrate the Custom Title plugin with News Manager (because NM doesn't use normal pages to store the posts).

Just the other day I was thinking about having something like this in NM - I'll add it to the to-do list. (#264)
Reply
@Hypertexter

Perhaps with this (replace the code you posted):
PHP Code:
<?php if (!nm_is_site()) { ?><h1><?php echo html_entity_decode(get_page_title(false)); ?></h1>
<?php } elseif (nm_is_tag()) { ?><h1><?php nm_single_tag_title('Topic: '); ?></h1>
<?php } elseif (!nm_is_single()) { ?><h1><a href="<?php nm_get_url(); ?>"><?php get_page_title(); ?></a></h1>
<?php ?>
Reply
Hi Carlos,

this is wonderful, it works perfectly! [Image: thumbsup.gif]

Thank you very much!

Hypertexter
Reply
Hi Carlos,

is everything ok with the custom_display_random function? I tried to make a new component to show random links. You write it is "like nm_custom_display_recent, but with randomly selected posts". But I don' get a result with this code:

PHP Code:
<?php
nm_custom_display_random
('
  <a href="{{ post_link }}">{{ post_title }}</a> <span class=nm_post_date> ({{ post_date }})</span><br /> '
);
?>

It works fine, when I just replace "random" with "recent", so the component seems to be good code.

Thanks,
Hypertexter
Reply
Do you have the latest NM Addons version? (0.9.5)
Reply
Exclamation Now? Yes! Big Grin
Thank you!
Hypertexter
Reply
(2017-06-24, 00:58:54)Carlos Wrote: @bensayers

No, I'm afraid there's no way to integrate the Custom Title plugin with News Manager (because NM doesn't use normal pages to store the posts).

Just the other day I was thinking about having something like this in NM - I'll add it to the to-do list. (#264)

Thanks Carlos, that would be great - I have a client that is a bit eager to have this option for SEO purposes.
Reply
Sorry for my English. Need help, maybe somewhere it was described but I did not find Sad I want the news on the site to show up not one by one but next to each other
[Image: block.jpg]
Reply
You either:


Use the existing output of the plugin for the News page and apply css to the classes as they are, so something like
div.nm_post {
   width: 25%;
   display: inline-block;
}


or you:
use the custom display function in news manager add-ons to totally integrate your posts into bootstrap or whatever layout you wish to use.
Reply
Hello,

I have three questions.

Firstly, I wanna remove /post/ in my blog links. Now my links like example.com/blog/post/hosgeldin, I wanna turn it to example.com/blog/hosgeldin

Secondly, auto link creator is not work properly, when i use "ı,ö,ü,ş,ç,ğ", it must be turn it to "i,o,u,s,c,g".
For example, if i use title as "Hoşgeldin", get-simple turns to link as "hogeldin", but I wanna "hosgeldin".

Thirdly, when I enter "space" in tags, it turns to "%20" sign. I wanna it turns to "+".

Thanks.
Reply
First one: see gsconfig setting NMNOPARAMPOST (and .htaccess update required) here:
http://www.cyberiada.org/cnb/news-manager-b/ -> Single post URLs without prefix

Second one: this is not related to News Manager, but I'll reply later.

Third one: not currently possible.
Reply
As for the third one, GS has built-in transliteration since 3.3.11 that should work for ç, ö and ü.

To make it work for the other characters, edit admin/lang/en_US.php and somewhere after this...
Code:
"TRANSLITERATION" => array(
...insert this:
Code:
// Turkish
  'ı'=>'i', 'ş'=>'s', 'ğ'=>'g',
  'İ'=>'i', 'Ş'=>'s', 'Ğ'=>'g',

Let me know if it works, please. Also if you think there are any other characters that should be included.
Reply
(2017-07-23, 02:09:22)Carlos Wrote: As for the third one, GS has built-in transliteration since 3.3.11 that should work for ç, ö and ü.

To make it work for the other characters, edit admin/lang/en_US.php and somewhere after this...
Code:
"TRANSLITERATION" => array(
...insert this:
Code:
 // Turkish
 'ı'=>'i', 'ş'=>'s', 'ğ'=>'g',
 'İ'=>'i', 'Ş'=>'s', 'Ğ'=>'g',

Let me know if it works, please. Also if you think there are any other characters that should be included.

It works! I added ç,ö and ü. Thank you so much.


Code:
 // Turkish
 'ı'=>'i', 'ş'=>'s', 'ğ'=>'g', 'ç'=>'c', 'ö'=>'o', 'ü'=>'u',
 'İ'=>'i', 'Ş'=>'s', 'Ğ'=>'g', 'Ç'=>'c', 'Ö'=>'o', 'Ü'=>'u',
Reply
You shouldn't need to add those, they should already be in the // Roman block.
Reply
Hi!
How to get a list of links to the monthly Newspostings? Is there any prepared function for something
like
...
July 2013
June 2013
May 2013
...
bell
Reply
Code:
<?php nm_list_archives(); ?>
Reply
now I see -I should have found it ... #-|
Thank you!


other point:
I changed the i18n_search_news.php near line 145 because the result-links doesn't work:
PHP Code:
//        case 'link': return get_site_url(false).$NMPAGEURL.'/post/'.substr($this->id,4);  // to 
 
          case 'link': return get_site_url(false).$NMPAGEURL.'.html?post='.substr($this->id,4);   
shure, its fragil and only for one, my %slug%.html URL-permalink-structur ...

bell
Reply
This patch should make it work for yours and other permalink structures:
http://get-simple.info/forums/showthread...4#pid44984
Reply
Hi Carlos and everyone else,

Is it possible to have different template files for different kinds of posts, as per:
single templateFile template-blog-post.php

But perhaps determined by tag, so for example, for image based posts I'd like to use one kind of template, for text based posts another. So I'd like to have a tag "image" and a tag "text" and depending which tag the post has, a different template file is used.

Something like this in custom settings?
single templateFile tag="text" template-blog-post-text.php
single templateFile tag="image" template-blog-post-image.php

Is this possible currently?
I'm not bothered about method (as per above), just whether this can be done at present.

Many thanks,
C.
Reply
Hi Carlos, I was trying to figure out how to display my featured image in my side component. at the moment I can display some posts at random with an excerpt but cant get my feature image to work.

Here is my code without the feature image, where should I be inserting it?

Code:
<p style="margin-bottom:10px;">
<?php nm_set_custom_excerpt(220);
nm_set_custom_maxposts(3);
nm_custom_display_random('
<h3 style="margin-bottom:-10px;"><a href="{{ post_link }}">{{ post_title }}</a></h3> <br />
{{ post_excerpt }} <a href="{{ post_link }}" style="color:#fff;text-decoration:none;">[...]</a> <br /><a href="{{ post_link }}" >More...</a>
');
?></p>

Cheers!
Reply
Hello again! I do have another question, how do I make the feature image full width of the div when the post opens up on its own page? I am trying to make it show as a thumbnail in the main window and full size on the post.

Cheers!
Reply




Users browsing this thread: 4 Guest(s)