Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
Hi Carlos.
I have updated a couple of lines of the Italian language file and tested it with lastest updates of the plugin and GS. Here is the file:
http://get-simple.info/extend/language/n...-file/579/

Cheers.
Reply
Thats Great TeeJay. It's good to know I can use whatever format I want. I will remove the Time part as that wan't be relevant for my website.

Thanks again for your efforts Smile
Reply
This month I'm having less spare time for development, etc. I'll continue when I finish some work stuff.

But in the meantime, I need some feedback about 2.4.0 beta:
http://get-simple.info/forums/showthread...0#pid34470

Since 2.3.5 there's just a small change that:
- fixes an issue when using GS's getPageContent, getPageField functions (e.g. to display another page's content in the sidebar)
- allows using other plugins' shortcodes/tokens (DynPages components, I18N Gallery, etc.) in news posts.

Even if you don't need that, I'd like that some (more) of you tested the beta and tell me if there's any trouble, or if it works like before (it should!).

It's as easy as replacing news_manager.php by the one in the attached zipfile.
(If there's any problem, just replace it again by NM 2.3.5's file).
Reply
Hello Carlos and others.

Just a little but quite important trouble when using I18n for multilangual site. Mlvcek has sent me here Smile

Only when I use custom permalinks like
Code:
mydomain.cz/en/pagetitle
News Manager articles/news don't work. The list of the articles with the excerpts is ok, however, after clicking onto some of the articles I get to the page with "Sorry, no content".

My custom permalink structure in the admin panel is
Code:
%language%/%parent%/%slug%/
and my .htacces is set like this
Code:
# News Manager setup ("clanky" = "articles" in English):
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
RewriteRule ^clanky/post/([^/.]+)/?$ index.php?id=clanky&post=$1 [L]
RewriteRule ^clanky/page/([^/.]+)/?$ index.php?id=clanky&page=$1 [L]
RewriteRule ^clanky/archive/([^/.]+)/?$ index.php?id=clanky&archive=$1 [L]
# end News Manager

# To make custom permalinks with both languages work :)
RewriteRule ^/?$ cs/ [R,L]   # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [QSA,L]

Everythings works as it is supposed be, except the news from News Manager articles. You can see News Manager lines (starting with "clanky", "clanky" is my menu tam with news from News Manager), which are there for Fancy URLs (you can use Fancy URLs and News Manager without these lines in .htaccess). What should I add or change about the News Manager lines to make it work with this plugin and Fancy URLs?

// an unimportant part from here
I would prefer using permalinks which add /language_code/ to the address only with non-default languages. It means that when my site is Czech as a default and English as a secondary language, it won't make addresses with /en/ with Czech setup. Only after setting up the language it will add /en/ to the address.
In this case, the custom permalink structure is
Code:
%nondefaultlanguage%/%parent%/%slug%/
and in the .htaccess there is changed only the last line (with comparison to .htaccess code above)
Code:
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en
However, I'm still working on making my site work with this setup, so don't bother with this so far, I think the key is to set something in front of "clanky" in the code of News Manager in .htaccess.
// the end of the unimportant part

Thanks for your help.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Not sure if it will work (not tested), but you can try...

Edit news_manager/inc/functions.php, find this line:
Code:
$url = find_url($NMPAGEURL, $NMPARENTURL);
and replace it by:
Code:
if (function_exists('find_i18n_url')) {
    global $language;
    $url = find_i18n_url($NMPAGEURL, $NMPARENTURL, $language);
  } else {
    $url = find_url($NMPAGEURL, $NMPARENTURL);
  }

Note: only valid for News Manager 2.3.x (previous versions didn't support GS's custom permalink structures, the patch would be different)

This MAY work if you don't enable fancy urls in News Manager. I have no idea how the rewriterules should be to make it work for that, sorry.

[EDIT] Tested: this patch does NOT work.
Reply
(2013-04-10, 15:56:01)Carlos Wrote: Not sure if it will work (not tested), but you can try...

Edit news_manager/inc/functions.php, find this line:
Code:
$url = find_url($NMPAGEURL, $NMPARENTURL);
and replace it by:
Code:
if (function_exists('find_i18n_url')) {
    global $language;
    $url = find_i18n_url($NMPAGEURL, $NMPARENTURL, $language);
  } else {
    $url = find_url($NMPAGEURL, $NMPARENTURL);
  }

Note: only valid for News Manager 2.3.x (previous versions didn't support GS's custom permalink structures, the patch would be different)

This MAY work if you don't enable fancy urls in News Manager. I have no idea how the rewriterules should be to make it work for that, sorry.
Thank you. However, the Fancy URLs are a must. Never mind, I will have to use I18N without the custom permalinks, I don't wanna loose NM Smile

Just to try if your solution for non-fancy URLs of NM works, I wanted to turn the NM's Pretty URLs off and the settings of Pretty URLs has disappeared for some still unknown reason so I could not turn it off. I have to search the problem.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(2013-04-11, 00:33:57)TeeJay Wrote: Just to try if your solution for non-fancy URLs of NM works, I wanted to turn the NM's Pretty URLs off and the settings of Pretty URLs has disappeared for some still unknown reason so I could not turn it off. I have to search the problem.

Enable GS fancy urls, then go to NM settings. The setting should then be available again.
Reply
(2013-04-11, 02:27:43)Carlos Wrote:
(2013-04-11, 00:33:57)TeeJay Wrote: Just to try if your solution for non-fancy URLs of NM works, I wanted to turn the NM's Pretty URLs off and the settings of Pretty URLs has disappeared for some still unknown reason so I could not turn it off. I have to search the problem.

Enable GS fancy urls, then go to NM settings. The setting should then be available again.
The site was screwed up totally, the settingsdidn't show up even after I re-enabled GS Fancy URLs. I restored a previous version and edited what was needed to get back to the current state and everything is different now.

I tried all the reasonable options. In all cases, .htacces included this:
Code:
# News Manager:
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
RewriteRule ^clanky/post/([^/.]+)/?$ index.php?id=clanky&post=$1 [L]
RewriteRule ^clanky/page/([^/.]+)/?$ index.php?id=clanky&page=$1 [L]
RewriteRule ^clanky/archive/([^/.]+)/?$ index.php?id=clanky&archive=$1 [L]
# end News Manager
The situations is like this:

With GS Fancy URLSs on and NM Fancy URLs off and no custom permalink structure, everything is okay and your code above is not needed. But I want also NM Fancy URLs on.
In this case, .htacces must include this
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [QSA,L]


Both GS and NM Fancy URLs on and no custom permalink structure. Everything is okay then, but you have the same address for both the English and Czech pages.
.htaccess must include only basics,
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]



With GS Fancy URLs on and NM Fancy URLs off and this custom permalink structure:
Code:
%nondefaultlanguage%/%parent%/%slug%/
Switching languages doesn't work, the site stays English. The NM posts work either with your code either without it. However, this options is useless without the ability to switch languages (with an exception of the index page).
In this case, .htaccess includes
Code:
RewriteRule ^/?$ cs/ [R,L]   # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]



With all Fancy URLs (GS and NM) on and this custom permalink structure
Code:
%nondefaultlanguage%/%parent%/%slug%/
everything works fine including the NM posts unless I use English. When I use English, /en/ is added to the address and NM posts don't work. It works only in the default language without anything extra in the address. Your code doesn't help in this case either as you supposed.
.htacces is the same as in the previous case - includes:
Code:
RewriteRule ^/?$ cs/ [R,L]   # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]



Strange is that after I played with these setups and then set up this last and best looking setup (everything on) again, it suddenly didn't work (but it did before). I think it could be some cache problem. However, I deleted cache and nothing solved it. Then I reuploaded my backup and set this settings again and it worked again!



To conclude, there are a 4 possibilities how to "live" Smile

1) GS Fancies on, NM fancies on, no custom permalink structure
- working

2) GS Fancies on, NM fancies off, no custom permalink structure
- working

3) GS Fancies on, NM fancies on, custom permalink structure
- NM posts not working when changed address with language part like /en/ etc., NM posts work only in the site's default language, otherwise it works

4) GS Fancies on, NM fancies off, custom permalink structure
- absolutely not working, cannot switch languages, but NM posts work
- strange, I think there is an error somewhere; but the setup is the same as in 3) and everything not working here works there.


So the only reasonable and fully working option is 2) so far. Nevertheless, if there could be solved the problem with either /en/ or nothing in an address for NM, it would be perfect. (I think about some easy if, but I don't know how to formulate it there). Never mind, thanks for trying to help Smile

Tom
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(2013-04-11, 05:18:05)TeeJay Wrote: I tried all the reasonable options. In all cases, .htacces included this:
[code]# News Manager:
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
...

Could you try removing all those NM rewriterules, and test with all this?
- the suggested patch
- a custom permalink structure like %nondefaultlanguage%/%parent%/%slug%/ (or %language%/%parent%/%slug%/)
- no NM fancy urls selected (make sure you have them disabled in NM by enabling it in GS first - no need to have that disabled in GS as the custom structure overrides it)

As I said I cannot help about rewriterules (I suppose they should be changed to include some lang parameter or whatever), but I'd like to know if that patch could make NM work with I18N base. (If you can't, nevermind, when I have some time I'll do my own tests.)
Reply
(2013-04-11, 05:57:05)Carlos Wrote:
(2013-04-11, 05:18:05)TeeJay Wrote: I tried all the reasonable options. In all cases, .htacces included this:
Code:
# News Manager:
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
...

Could you try removing all those NM rewriterules, and test with all this?
- the suggested patch
- a custom permalink structure like %nondefaultlanguage%/%parent%/%slug%/ (or %language%/%parent%/%slug%/)
- no NM fancy urls selected (make sure you have them disabled in NM by enabling it in GS first - no need to have that disabled in GS as the custom structure overrides it)

As I said I cannot help about rewriterules (I suppose they should be changed to include some lang parameter or whatever), but I'd like to know if that patch could make NM work with I18N base. (If you can't, nevermind, when I have some time I'll do my own tests.)
I just did as you wish.

The result is terrible, the index page is alright.
After clicking onto any other menu tab, the site switches to English and cannot be switched back into Czech unless I go to the index/title page.
Furthermore, after clicking onto an article in the News page, I got black-white error screen
Code:
Not Found

The requested URL /demo/testTeeJay/plus/en/clanky/ was not found on this server.
Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch Server at websimple.cz Port 80

Something wrong I guess Smile

The setup was as you said - no NM setting in .htaccess, Fancy URLs of the NM switched off correctly. .htacces was:
Code:
RewriteRule ^/?$ cs/ [R,L]   # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]
The last line in the .htaccess seemed to be the problem, so I changed it to
Code:
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [QSA,L]
and the site is working now.

However, the NM problems with the error screen stays cool, unchanged.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
@TeeJay

Another test. This should make NM 2.3.5 generate its permalinks the way it did until 2.2.6, i.e. default index.php?id=slug&post=title, fancy /parent/slug/post/title, with no support for custom permalink structure.

Edit news_manager/inc/functions.php and replace the whole nm_get_url function by:

Code:
function nm_get_url($query=false) {
  global $SITEURL, $PRETTYURLS, $NMPAGEURL, $NMPRETTYURLS, $NMPARENTURL;
  $url = find_url($NMPAGEURL, $NMPARENTURL);
  if ($query) {
    if ($PRETTYURLS == 1 && $NMPRETTYURLS == 'Y')
      $url .= $query . '/';
    elseif ($NMPAGEURL == 'index')
      $url = $SITEURL . "index.php?$query=";
    else
      $url = $SITEURL . "index.php?id=$NMPAGEURL&$query=";
  }
  return $url;
}
Reply
@Carlos

Sorry, doesn't work with any setup. Nor with NM Pretty URLs on, neither with them off. Furthermore, it doesn't work with and without custom permalink structure either. I can make the site work correctly but after clicking onto an article, I get "The page wasn't found, sorry" from NM.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Can you post some examples of links to posts from the main news page? With and without fancy urls please.
(Remove the domain from the links, I just want to see the structure)
Reply
(2013-04-11, 17:55:13)Carlos Wrote: Can you post some examples of links to posts from the main news page? With and without fancy urls please.
(Remove the domain from the links, I just want to see the structure)
OK Smile

With this .htaccess
Code:
# News Manager:
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
RewriteRule ^clanky/post/([^/.]+)/?$ index.php?id=clanky&post=$1 [L]
RewriteRule ^clanky/page/([^/.]+)/?$ index.php?id=clanky&page=$1 [L]
RewriteRule ^clanky/archive/([^/.]+)/?$ index.php?id=clanky&archive=$1 [L]
# end News Manager

# # To make the site work with no custom permalink structure
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]


With all fancies on and custom URLs off...

... the link to the main news page looks like this
Code:
http://mydomain.cz/clanky/
translated for better comprehension as
http://mydomain.cz/news/

...and the posts themselves like this
Code:
http://mydomain.cz/clanky/post/clanek-10
and translated for your better comprehension as
http://mydomain.cz/news/post/article-10



With the same .htaccess, GS fancies off and again no permalink structure...

... the link to the main news page looks the same as in the previous case and the posts themselves look like this
Code:
http://mydomain.cz/clanky/?post=clanek-10
which can be translated as
http://mydomain.cz/news/?post=article-10

... without the .htaccess above but without the News Manager settings it's the same as in the previous case.



All tested with CZ lang setting, however, without the custom permalink structure the links are the same.

Do you need some more? I can try and show you also them in both languages after my English seminar lesson Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(2013-04-11, 20:57:09)TeeJay Wrote: All tested with CZ lang setting, however, without the custom permalink structure the links are the same.

Yes, that last patch ignores the custom permalink structure (that's how NM worked before 2.3).

Please try this:
- set %nondefaultlanguage%/%parent%/%slug%/
- use the rewriterules for that structure
- enable GS and NM fancy urls
- see if your news/clanky page (and posts) works at least when in the default language.

you could also try without fancy urls, etc.
Reply
(2013-04-12, 18:50:39)Carlos Wrote:
(2013-04-11, 20:57:09)TeeJay Wrote: All tested with CZ lang setting, however, without the custom permalink structure the links are the same.

Yes, that last patch ignores the custom permalink structure (that's how NM worked before 2.3).

Please try this:
- set %nondefaultlanguage%/%parent%/%slug%/
- use the rewriterules for that structure
- enable GS and NM fancy urls
- see if your news/clanky page (and posts) works at least when in the default language.

you could also try without fancy urls, etc.
Sorry, had no time at all. Have to study for credits. Smile

The I18N switching languages is broken in all these cases, the site stays in English (default after visiting is Czech, but English is my Opera browser, so I don't know what it chooses).
The I18N seems to be a rewriterules problems, I think I should ask someone about it here on the forum.

When I tried these possibilities, it worked and I wasn't sure if I did everything correctly, I did it again and it didn't work. I can't give you guaranteed result at the moment. Maybe next week, I will see what I can do.

I've got a feeling that there's something cached and it might not work every time. Not sure, just a possibility. I have too little time to try everything, it makes me hurry and I feel confused and not sure if I didn't make a mistake.

Sorry, I'll look onto it soon and I will aim at the setting with the custom permalinks only like this %nondefaultlanguage%/%parent%/%slug%/ and all Fancy URLs on. That the only setup I want to reach, it it were different, I would rather keep custom permalinks structure unfilled, off.

Thanks for your time, I'll give you a notice soon.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Can't find the documentation Huh can anyone post the link? Thanks.
Reply
(2013-04-16, 22:41:40)thejae Wrote: Can't find the documentation Huh can anyone post the link? Thanks.
Look at the first post, there are links to everything about this plugin Smile

http://get-simple.info/forums/showthread.php?tid=3972
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(2013-04-17, 01:33:51)TeeJay Wrote:
(2013-04-16, 22:41:40)thejae Wrote: Can't find the documentation Huh can anyone post the link? Thanks.
Look at the first post, there are links to everything about this plugin Smile

http://get-simple.info/forums/showthread.php?tid=3972


These links are only descriptions to what the plugin do. How to actually use it, what parameters to pass etc... Some implementation documentation.

Something like this page:
http://www.cyberiada.org/cnb/news-manage...ns-plugin/
Reply
(2013-04-18, 11:21:31)thejae Wrote: These links are only descriptions to what the plugin do. How to actually use it, what parameters to pass etc... Some implementation documentation.

Something like this page:
http://www.cyberiada.org/cnb/news-manage...ns-plugin/

Sorry, but there is everything needed.

Read the first post properly please, you can see what you need to do.
http://get-simple.info/forums/showthread.php?tid=1056
(2010-10-15, 07:10:51)roog Wrote: Installation

You can download the latest version from here. Unzip the downloaded file and copy its contents to your plugins folder. The required data folder and configuration file should be created automatically when you first access the plugin.

Usage

To access the plugin, go to the News Manager submenu under the Pages tab. Once you're in the News Manager main admin panel, you will notice three buttons in the top-right corner: Settings, Create New Post and Filter. The Settings button allows you to change the behavior of the News Manager plugin, with the Create New Post button you can start writing new posts and the Filter button lets you search through long lists of posts.

You just set it up in the GS administration panel according to these instructions and you can write post immediately.


For further implementations help and tips, see for example this link
http://get-simple.info/forums/showthread...1#pid31721


About the date format, scroll down here
http://get-simple.info/forums/showthread.php?tid=3972



I can't figure out what is not clear about this plugin. If you need I can tell you exactly what to do, just ask me what exactly you don't understand.


So, implementation is like this
- you install the plugin by copying into the plugins folder, allow the plugin in the GS admin panel / Plugins
- you go to the GS admin panel / Pages / News Manager / Settings, you set what page of your website you want your news, posts or articles to be posted on (if you don't have such page, you create it)
- you can also set if there will be excerpts (short texts) under every heading of a post in the news or posts or articles page and the number or characters if yes, or the whole posts
- you can set the Fancy URLs on there

You don't have to write anything into the code except the date format in the lang file (see posts above)

What I can strongly recommend you is what I personally did when starting using this plugin two months ago. Go through all the pages of all the topis about these plugins. It will help you understand how it works and the problems connected with it and so on.

PS: I don't think there is clearly a documentation page that you want, because it's not needed for this plugin I think. Also as Carlos helped me to find something here on the forum, use google search with the site prefix, so you use it like "site:get-simple.info your keywords or anything you want to find on this website"

Tom
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(2013-04-05, 16:43:19)-FrA- Wrote: Hi Carlos.
I have updated a couple of lines of the Italian language file and tested it with lastest updates of the plugin and GS. Here is the file:
http://get-simple.info/extend/language/n...-file/579/

Cheers.

Do you want me to include it in the next News Manager?

I so, would prefer it to be like the other contributed NM translation files: a short one-line header description, with no version/revision numbers, dates, GPL... That is, one that I can update myself later without having to maintain those data.

Something like this:
Code:
/**
* News Manager Italian-Italy language file by Your_Name (http://your_url)
*/

BTW another user sent me a slightly different italian lang file (he didn't know you had already done one) before you did this last update. But you did the first one, so if you don't mind reducing the header, please send me a modified version and I'll include it.
Reply
Some SEO tips for News Manager (previously posted here):

- Change your template's <?php get_header(); ?> to <?php get_header(false); ?>
This way your site won't have the canonical meta tag (all posts have the same canonical url, that of the news page)

- Have the post title inserted in the <title> meta tag. You can do one of these:
  • install and activate the News Manager Title plugin
    or (better, if you use News Manager 2.3+)
  • use the new template tag nm_post_title - see here
Reply
(replying to: http://get-simple.info/forums/showthread...5#pid35795 )
(2013-04-25, 19:06:01)TeeJay Wrote: Btw, I occured a little I18N breadcrumbs problem. The whole I18N navigation includes hyperlinks with links to the current page, so I needed also the navigation to NM posts be links. I did this, which works, but there's a little trouble that you can immediately see, I think.

Code:
<p class="breadcrumbs" >
  <a href="<?php echo find_url('index',null); ?>">
    <?php if ($language == 'cs') { ?>Úvod<?php } ?>
    <?php if ($language == 'en') { ?>Home<?php } ?>
  </a>
    <?php get_i18n_breadcrumbs(return_page_slug()); ?>
    <a href="#"><?php nm_post_title('&raquo; '); ?></a>    
</p>

With this, the "»" (the prefix &raquoWink is also underlined (is a part of the hyperlink. So it's finally consistent with an exception. If I put the "»" outside the function, it would be shown all the time, even if there's nothing behind it. It's embarrasing to have an arrow pointing to an empty space, isn't it? Smile

So I would like something
IF nm_post_title == NOT EMPTY STRING, THEN show "»" and next to it the hyperlink to nm_post_title. So the hyperlink would be only the post title without the separator "»".

Can you write such line for me, please? Thank you.

You can use nm_post_title for conditionals, to check if you're browsing a (full) post page, so you could do it like this:

PHP Code:
<?php if (nm_post_title('','',0)) { ?> &raquo; <a href="#"><?php nm_post_title(); ?></a> <?php ?>
Reply
(2013-04-26, 00:41:32)Carlos Wrote: You can use nm_post_title for conditionals, to check if you're browsing a (full) post page, so you could do it like this:

PHP Code:
<?php if (nm_post_title('','',0)) { ?> &raquo; <a href="#"><?php nm_post_title(); ?></a> <?php ?>
Works perfectly. I don't really understand the syntax of such composite code, but it doesn't matter. I will think about it later. Thank you Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Hi Carlos! Thank you for continuing support for News Manager. I am using the Updater plugin for GS. As you can see in the screenshot, it tells me that I have your version 2.3.5 installed, but it identifies the last version of the old plugin (2.2.4) as current. Also, it appears that you never made a module entry for that Create Post module you whipped up.

Updater is really useful for keeping up on patches. I hope it's an easy fix on your end.

[Image: Screen_Shot_2013_05_03_at_5_55_28_AM.png]
Reply




Users browsing this thread: 15 Guest(s)