Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager
#76
Version 3.0, the editor does not work
Reply
#77
Oleg06 Wrote:Version 3.0, the editor does not work

fixed
Reply
#78
This baby has come a long way, and its impressive that it can do what it does with such clean and concise coding. Well done, my good man. Smile

Since you've been so good at filling out that last request (which did everything perfectly, might I add), I have a few other suggestions that you may consider adding if you have the time (but these needn't affect the final product you have now; everything at the moment is fine).

Pseudo-Slug Capabilities
If people want to rename their xml files, they do so manually. Granted, it'll be the more experienced (and more pedantic) user who'll be doing this, but perhaps a function can be added that acts like a page slug, so it doesn't need to be done from the back-end all the time. However I would understand your possible reasoning that in doing this it'll essentially be the same as a normal page.....hmm.....

Avatars
A small text-field that you enter the url for, and the output would give the avatar link within img tags. A simple tick-box field would enable/disable this function per-article, so it isn't a necessity on each page. This could be written in so simply, and the fact that other news/blog plugins for GS don't have the feature means that you could set this thing out with something unique yet desireable.

.htaccess-ibility?
Not sure how this one would work, but it would be a way of encouraging users to write their own htaccess rules. Sorta like how the settings page for the main site allows you to change things over to pretty-urls, it'd be cool to have a main 'Roog's News Manager Settings' page that lets you define the link structure from within GS. Again, don't even know if this'd be feasible, but I'm just putting it out there as a concept.

Thanks again for the work you've put in and I hope to see more great plugins from you in the future!
Reply
#79
Version 3.0 editor works Smile
Reply
#80
can still do something to accommodate 1 news in the sidebar?
http://neowebtime.ru/0/
try to click
Reply
#81
@Angryboy: Thanks a lot! It's really nice to hear so much appreciation for my work! I'll be on vacation for the next 2 weeks, but I'll look into your suggestions when I come back.

@Oleg06: Looking at your website it seems that having this plugin located in the sidebar works pretty well already, isn't it? Maybe you can clarify what changes you would like to see?
Reply
#82
I would like to see when you click on the news in the sidebar takes you to a page "news"
Reply
#83
I have these problems/questions:

How can I put it in the main page (homepage)?
Is it possible to edit the theme/structure of a news article?
Can I put the code in a simple page by the editor?

I'm using the 3.0B r404 version.

Thanks in advance Smile

PS. Sorry for my English, 'cause I'm Italian ^^"
Reply
#84
Daddie Wrote:I have these problems/questions:

How can I put it in the main page (homepage)?
Is it possible to edit the theme/structure of a news article?
Can I put the code in a simple page by the editor?

I think you mean 1 or 2 news items on the main page and if you go to the news page that there is the rest? Always the newest items on the main page...
Reply
#85
@Daddie
If you download and install mvlceck's DynPages plugin, then you can paste the following code into a Component:

Code:
<?php show_articles(); ?>

Name the component 'news'. Then in the actual page you want the news in, paste this wherever you want it to be displayed:

Code:
{ % news % }

And you should have the desired result.

-----

For you to edit the structure, you'll need to know the CSS of the elements in order to style them accordingly. For things beyond this, you'll need to edit the actual news_manager.php file and modify the outputted coding.

-----

Not sure I understand that third request xD

-----

Hope this has helped.
Reply
#86
Congratulations for your plugin, it is perfect for me.

One thing, "Browser Server" button does not show, I change the plugin code a little to fix this. I think that the problem is the function that calls to editor not send all parameters.

I copy below the changes that i made in code:


<?php echo $TOOLBAR; ?>
]
<?php echo $EDOPTIONS; ?>,
tabSpaces:10,
filebrowserBrowseUrl : 'filebrowser.php?type=all',
filebrowserImageBrowseUrl : 'filebrowser.php?type=images',
filebrowserWindowWidth : '730',
filebrowserWindowHeight : '500'
});


Thank you for your work.
Reply
#87
Thank you for a useful plugin and please keep updating.

Its versitility as a blog would come to full effect if free-hand tag writing where possible
by multi parameter pass e.g. <?php show_articles($count, $tag, $tag_case); ?>
break down:
$count (number of posts)
$tag (tag matching string)
$tag_case (tag case positive or negative sensetivity)

Just a wish for the next release.

/eLu
Reply
#88
Since no one seems to be shy about questions, here's mine:

1. Everything appears on every page. Instructions said to install in template. I guess the behavior is not surprising then.

2. When I click on the excerpt Read More link, the entire article(s) follows on the same page.

What I need is - as everyone else and the example describes - is the excerpts on the home page or in the sidebar (much preferred) and a news page to house the full article.

Please be gentle. New to Get-Simple over the weekend.

SNZ
Reply
#89
great plugin.
I add something that I think is missing
Code:
/*******************************************************
* @function list_articles
* @param $page_id - id of page to show
* @param $n - number of articles
* @action displays news articles on theme/site page
*/
function list_articles($page_id,$n = 5){
    $articles = get_articles();
    if (!empty($articles)) {
//        $url = get_page_url(TRUE);
//        $url .= preg_match('/\?/', $url) ? '&' : '?';
          $url="index.php?";
    ?>
    <ul class="article_list">
    <?php
      
      foreach ($articles as $article) {
        if ($n--<0) break;
        $id = basename($article, '.xml');
        $data=getXML(ARTICLEDATA . $id . '.xml');
        $title = stripslashes(htmlspecialchars_decode($data->title, ENT_QUOTES));
        printf("<li><a href=\"%sid=%s&article=%s\">%s</a></li>",$url,$page_id,$id,$title);
      }
      
    ?>
    </ul>
    <?php
    }
}

check it and if you like add

usage:
in template sidebar.php add something like
Code:
<div class="section" id="news_list">
       <h2>Latest news</h2>
        <?php list_articles('vesti');    ?>
    </div>
Reply
#90
RewriteEngine On
RewriteRule ^news/([^/]*)\.html$ /index.php?article=$1 [L]
Angryboy posted this piece of code early in the thread. Has anyone gotten this code to work so that the articles posted are SEF? This is really the only thing this news manager needs.
Todo arde si le aplicas la chispa adecuada.
Reply
#91
First off, this is a great plug in, but i had to tweak it.

i would like to share my tweak, I don't recall seeing it on here, but if it is disregard this.

My tweak is for the news list. if i add a news item without excerpt, it tends to post the full article on the list, which to me is not needed. I wanted it to show just the list of articles and if there is an excerpt then it shows if not then it doesn't.

so, in order to make that work i had to add a little code in the news_manager file.

Open the news_manger.php and look for
Code:
function show_article($id, $excerpt=FALSE)
function.

In that function look for
Code:
if ($excerpt && !empty($data->excerpt)) {
      $content = '<p>' . stripslashes(htmlspecialchars_decode($data->excerpt, ENT_QUOTES)) . '</p>';
    }

edit it to make it be:
Code:
if ($excerpt){
      if(!empty($data->excerpt))
            $content = '<p>' . stripslashes(htmlspecialchars_decode($data->excerpt, ENT_QUOTES)) . '</p>';
      else
            $content = '';
      }

this will not show the full article content if there is no excerpt.

if i make more tweaks be sure to know i'll be posting them.

regards

irperera
Reply
#92
I tested Version 1.2.4 with GS 3.0

as "our" CMS is called "GetSimple", the users don't get a simple newsmanager ;=)
  • you need css-definitions in your stylesheet, but there is no example css-file and the documentation at http://rxgr.nl/getsimple just names that there are css-classes, please add a readme to your plugin - zip
  • The readme should contain info where to enter news, a newbie is confused at first
  • The plugin is in english, no support for translation, so non-english-speakers must edit the php directly
  • still the constante and not the real path in the errormessage: <i>GSDATAPATH/articles</i> ...
    as there is no documentation that you have to create this directory BEFORE you "install" the plugin, this is confusing
  • I managed somehow to create an article without title. This article still exists in the list of articles, but I cannot edit it anymore, I can only delete it.
    On the other hand the article is not in the news-output, but an error message: "The requested article does not exist."
    So I have to delete that article and rewrite it, but I never get it in the original sequence

    PS: in the meantime, I have 3 articles without titles, which are not listed and cannot be edited
  • Pagination now works
  • When you followed "read more", there is no way back to the list
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#93
I tried to write more in the text in the posting, but run into a server error, don't know why

I continue here:
  • Why do you create your own Editor-Toolbar? This is absolutely not necessary. I define an editor-toolbar for my installation, the users get used to it and with this plugin suddenly an editor with different toolbar and other buttons is activated.
    Why do you define Editor-Options like

    => skin : 'getsimple',
    => forcePasteAsPlainText : true,
    => entities : true,
    => uiColor : '#FFFFFF',
    => height: '300',
    ?

    Just take the options from GSEDITOROPTIONS, but do not overwrite them
  • If you have articles with no titles, the counting of the articles on one page counts these articles, but let's say I have 2 articles without title (#4 and #5) and one "real" article (#6), pagination counts these articles, but there is only one article plus 2 error messages on that first page.
    Site visitors will be very astonished when they read "the requested...", they did not request it ;=)
  • The info "it does not work with fancy urls" is wrong, you should write: It does not support them, it is creating still "old-style"-links
  • To say "if you want fancy urls you must experiment yourself" is not really "get-simple" ;=)
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#94
Connie Wrote:I tested Version 1.2.4 with GS 3.0
I managed somehow to create an article without title. This article still exists in the list of articles, but I cannot edit it anymore, I can only delete it.
On the other hand the article is not in the news-output, but an error message: "The requested article does not exist."
So I have to delete that article and rewrite it, but I never get it in the original sequence

PS: in the meantime, I have 3 articles without titles, which are not listed and cannot be edited

I've got the same, but I made some investigation and realized that it's up to localization/encoding/entities in the plugin. Whenever I've put non-ascii character, for example Polish 'ó' (oacute), into the title - article title completely disappeared. The XML file stayed here, but with the <title> tag empty. When I edit the physical file and put the title without non-english chars - article shows again and can be edited from admin panel.

I'm using GS 3.0,
News Manager v.1.2.4,
i18n plugin v.1.1.1 with Polish language files (pl_PL.php)
and Polish GS language file
with pl.js file for CKEditor.

Finally here's my current news_manager.php code (excerpts):
* in function article_overview()
Code:
$title = htmlspecialchars_decode($data->title, ENT_QUOTES);
instead of
Code:
$title = html_entity_decode($data->title, ENT_QUOTES, 'UTF-8');

* in function edit_article($id) in CKEDITOR.replace parameters
Code:
entities : false,
instead of
Code:
entities : true,

* in function save_article()
Code:
$title = htmlspecialchars($_POST['post-title'], ENT_QUOTES, 'UTF-8', false);
     $content = htmlspecialchars($_POST['post-content'], ENT_QUOTES, 'UTF-8', false);
     $excerpt = htmlspecialchars($_POST['post-excerpt'], ENT_QUOTES, 'UTF-8', false);
instead of
Code:
$title = htmlentities($_POST['post-title'], ENT_QUOTES, 'UTF-8');
     $content = htmlentities($_POST['post-content'], ENT_QUOTES, 'UTF-8');
     $excerpt = htmlentities($_POST['post-excerpt'], ENT_QUOTES, 'UTF-8');

My GSCONFIG.PHP file got
Code:
# WYSIWYG editor language (default en)
  define('GSEDITORLANG', 'pl');
and
Code:
# Set PHP locale
  # [url]http://php.net/manual/en/function.setlocale.php[/url]
  setlocale(LC_ALL, 'pl_PL');
but I'm not sure if it does matters

Now my news_manager plugin works as I wanted.

I'm pretty new in GetSimple and PHP (especially with security risk) so tell me if I am wrong with this changes.
Reply
#95
Basically I did similar things but I got rid of encoding into entities for excerpt and title, as basically I do not intend to use html tags in both input/textareas.

I attach an archive with my own version (html5 ready), but those who'd like to use this plugin have to translate to their own language on their own.
The file contains couple minor improvements (like "go back" link in whole news content), and utilise css.
Change below styles to your taste (add colours to text), as some blocks inherit styles from parents in mine css.

Code:
/********
    news
*********/

div.article {
  margin-top:10px;
}
h3.article_title {
  float:left;
  margin:0 0 10px -5px;
  width:82%;
  overflow:hidden;
  font-size:11pt;
  }
h3.article_title a{
  display:block;
  margin:0 !important;
  padding-left:10px !important;
  text-align:left !important;
  line-height:20px !important;
}
div.article span.article_date {
  display:block;
  float:right;
  padding:0 !important;
  font-weight:bold;
  font-size:14px !important;
  line-height:24px !important;
}
div.article_content {
  display:block;
  margin-left:10px;
  margin-bottom:20px !important;
  clear:both;
}
div.article_content p {
  font-size:12px;
  line-height:18px;
}
div.article_content p.return-to-news-list {
  margin-top:10px;
}
div.article_content p.read-more {
  margin:0;
  margin-top:-20px;
  margin-bottom:10px;
  padding-right:30px;
  text-align:right;
}
div.article_content p.read-more a{
border:none !important;
padding:4px 8px !important;
}

PS: do not overwrite your existing version of plugin, as this one has a different file name pattern, thus your already existing news may stop working.
Addons: blue business theme, Online Visitors, Notepad
Reply
#96
Hello

First, I'm not PHP programmer in any way, just a webdesigner Smile I was looking for easy to use CMS and found Get Simple. I really like it. I was checking out this plugin and it's really useful. Only thing I miss is return to articles page from full news page. Is it possible to add something like this? I also wonder how to change English months' names to names in my own language (Polish).

Greetings
Blazej
Reply
#97
replace line 285 in news_manager.php
Code:
echo "<p class=\"article_meta\"><b>Permalink:</b> <a href=\"$url\">$url</a></p>";
on
Code:
echo "<p class=\"back_news\"><a href=\"javascript:history.back()\">Back</a></p><p class=\"article_meta\"><b>Permalink:</b> <a href=\"$url\">$url</a></p>";

http://neowebtime.ru/1/news-1?article=4d91a017e7f28
Reply
#98
Большое спасибо Ольег Smile
Reply
#99
@roog: you have a pm !
My Site: The Harad's Forge
Do you want a guestbook on pages or on news manager articles?Download my GS plugin: ARGuestbook
Reply
there is a big bug,when i write a considerable excerpt (I believe at least 10 lines),after i click on save,in the news manager admin tab aren't shown the name and the date of these article and if i open my site the article isn't shown.

This is a screenshot:

[Image: majl8o.png]
My Site: The Harad's Forge
Do you want a guestbook on pages or on news manager articles?Download my GS plugin: ARGuestbook
Reply




Users browsing this thread: 3 Guest(s)