Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager
#51
@madvic: I'll fix the QUERY_STRING issue somewhere next week, because I'm a very busy with other things right now. Hang on :-).

@oleg06: No, it's not impossible to create links to single articles, I just didn't have the time yet (see above). I'll get to it in the near future.

@connie: The first post of this forum clearly explains how to use this plugin, the rest is only about bugs and feature request and thus not necessary for understanding it.
Reply
#52
Oleg,

prastitie, ya ni ponimaio vashe text ;=)
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#53
объясню по-русски, а вы уж гуглем переводите
неужели никто не может написать нормальный плагин новостей?
для этого нужно:
1. Сделать так, чтобы страницы с новостями сохранялись в папке pages, как это реализовано в плагине I18N Search;
2. Сделать пагинацию страниц, чтобы можно было регулировать количество новостей на одной странице;
3. Сделать возможность либо задавать количество слов или знаков для короткой новости, либо писать отдельно текст короткой новости и текст полной новости, как это реализовано в плагине Dominion Blog/News;
4. Обязательно должна быть возможность вставлять в текст изображения, в том числе и в короткой новости;
5. Желательна возможность создания любого количества категорий, как это реализовано в плагине Dominion Blog/News;
Вот и все, что нужно для нормального плагина новостей.
Reply
#54
Oleg asks:

maybe somebody can write a "normal news plugin" with the basic functionalities:

a news plugin that
- paginates with a defined number of news on a page
- gives the opportunity to define the number of words for short excerpts
- or to enter text for short excerpt and text separately
- can integrate images in the text (also in excerpt)
- that offers categories (like the plugin "Dominion Blog/News")
- that news will be listed in a separate folder
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#55
4-5 plugins already created the news and in each of them lacks some features
for small sites I use Dominion Blog/News
http://art-dimnik.ru/dymniki
http://artelena-photo.ru/news
http://without-db.ru/index.php?id=news&d...1%82%D0%B8
Reply
#56
I am waiting for a suggestion how to get pagination working

clicking on "older articles" always reloads the same page, as I already pointed out before

I have fancyUrl activated and I whish I could use the newsmanager

but with wrong pagination no use...

Cheers. Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#57
Hi Connie,

The news manager plugin doesn't work with fancy urls just like that, as they depend on your site configuration. So I'm afraid you have to fiddle with the rewrite rules yourself. Try to find a good mod_rewrite tutorial and see what works best for you.

Good luck!
Reply
#58
I've released version 1.2.0 of this plugin, which now features article excerpts that link to the full article. Amongst other small bugs, the QUERY_STRING issue has been solved too.

Have a nice weekend!
Reply
#59
finally, thank God!
http://neowebtime.ru/0/news
also make links with the numbers ?article = 1, ?article = 2, ?article = 3 ... but not ?article = 4d7a5bb890b41
for the possibility of using Paginator 3000 http://karaboz.ru/?p=12

whether it is possible to attach a link to the full article <a href="javascript:history.back()">&laquo;&laquo; Back</a>
Reply
#60
@roog,

unfortunately I was so often in mod_rewrite rules, but I always forget them and it takes so much energy to dig into that...

I hoped there would be a solution for my problem (which is not only my problem)

Cheers,

Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#61
Oleg06 Wrote:finally, thank God!
http://neowebtime.ru/0/news
also make links with the numbers ?article = 1, ?article = 2, ?article = 3 ... but not ?article = 4d7a5bb890b41

Edit news_manager.php, and replace line 47 with
Code:
$id = empty($_GET['edit']) ? count(get_articles())+1 : $_GET['edit'];

Existing articles will still have a unique id (which is generated basing on creation time), but newly created articles will have their names set based on existing articles number + 1.

As it goes for the rest of your "request", I didn't understand even a word from it :/
Addons: blue business theme, Online Visitors, Notepad
Reply
#62
Thanks yojoe, looks like a good solution.
Reply
#63
thanks, everything works fine

I'll use it only for people who need pagination
Reply
#64
roog Wrote:Thanks yojoe, looks like a good solution.
I was thinking about using stripped news name + a unique number (like all articles number +1) but then the title would have to have embedded slugtranslit plugin, along with char switch array.
And this is just too much of a hassle.

Now I'm thinking if it would be a good idea to use day-month-year-[news_number] as a file name.
There are still things to solve with link to news.
I rewrite all links to add .html at the end of the slug, and get:
mypage/news.html?article=5

When I find some time I'll try to mess with modrewrite to achieve mypage/news/article/[number] URI, although I'd love to achieve mypage/news/date/[news_number] pattern.
But I have no idea how to prepare the name of the file and then create a rewrite to make date/[news_number] under condition there is more than 1 news created in the same day.

ps. to have the news saved as current_date-news_number, replace line 47 with
Code:
$today = date("j-m-Y");
    $articles_number = count(get_articles())+1;
    $id = empty($_GET['edit']) ? $today.'-'.$articles_number : $_GET['edit'];

Had to assign functions to vars, otherwise it wasn't working :/
Addons: blue business theme, Online Visitors, Notepad
Reply
#65
article for some reason went to the end http://neowebtime.ru/0/news?page=1
Reply
#66
Oleg06 Wrote:article for some reason went to the end http://neowebtime.ru/0/news?page=1
Try to manually change earlier articles filenames with a pattern day-month-year-[number], using earlier dates than the latest created news.

I noticed this thing, but I have no idea how is the sort($articles); function working.
I mean by what attribute does it sort the articles, but it reverses the output.
Roog: if you have more time, look at this problem.
Addons: blue business theme, Online Visitors, Notepad
Reply
#67
I suggest you save your articles using a year-month-day pattern, as this will probably solve your sorting issues.
Reply
#68
Thank you, and you will forgive me for my english :-)
Reply
#69
roog Wrote:I suggest you save your articles using a year-month-day pattern, as this will probably solve your sorting issues.

Yes, with date set as year-month-day-[id], everything works fine.
Oleg: just change date("j-m-Y") to date("Y-m-j")

roog: are you going to expand this plugin further ?
It works like a charm, but it still needs:
- translation possibility (not messing with core)
you could grab GS translation file, as it contains most of translated words/sentences.
- pagination should contain number of pages like <-older 1 | 2 | 3 |4 -> newer
- preview option (like pages)
- tags is a hard thing, as it needs to work with some kind of a search function.

I think that moving date creation to be shown along with news title, or at the end of the container is a better idea (I'm just about to change it).
News body could contain date of edit, but this feature should be switchable.

hmmm...supposing I want to have 2 instances of news, is it enough to duplicate the plugin and change its name ? If not, think about creating multiple instances, so this plugin could work also as a blog.


edit: I'm thinking about implementing translation variables from GS language file, but I haven't had much practice in plugin development.
But preview option at article listing page shouldn't be much of a hassle.
Addons: blue business theme, Online Visitors, Notepad
Reply
#70
yojoe Wrote:are you going to expand this plugin further?

Yes I will, though probably not all the changes you propose. I prefer this plugin to be simple without compromising on usability of course. More specifically, It's not my goal to turn this plugin into a blog because I think it would be difficult to integrate it nicely into GS. If you want a blog, then maybe you better use a blog oriented CMS.

Thus, for now, translations and a more sophisticated pagination seem like workable additions, the others I'm not sure of. A preview option is actually not that easy, because you need to know on which page (template) the user shows his articles. This is something the plugin only knows about when called via the show_articles() function, and therefore not when you are in the admin section.

Having 2 instances of the news plugin won't work just like that, because duplicate functions confuses GS; you'd have to rename the function names of the second instance.

That said, you are of course free to alter the plugin in any way you want and post your contributions here, or start your own plugin. In any way, please continue giving me feedback and feature requests, as it will improve this plugin!
Reply
#71
Your plugin is excellent
Code:
Oleg: just change date("j-m-Y") to date("Y-m-j")

Thanks, I'm happy with everything
http://neowebtime.ru/0/news?article=4d7a64e37dceb
http://neowebtime.ru/0/news?article=8
http://neowebtime.ru/0/news?article=14-03-2011-9
Reply
#72
roog Wrote:Yes I will, though probably not all the changes you propose. I prefer this plugin to be simple without compromising on usability of course. More specifically, It's not my goal to turn this plugin into a blog because I think it would be difficult to integrate it nicely into GS. If you want a blog, then maybe you better use a blog oriented CMS.
Blog was just an easy example.
The most important thing is some kind of a plugin, allowing to create multiple article instances.
It would be as well a clever plugin for portfolio-like websites.
I'm personally not a bloger type of web user, but as a frontend dev I think on all possible aspects of things Wink

Quote:Thus, for now, translations and a more sophisticated pagination seem like workable additions, the others I'm not sure of. A preview option is actually not that easy, because you need to know on which page (template) the user shows his articles. This is something the plugin only knows about when called via the show_articles() function, and therefore not when you are in the admin section.

I would like to try to handle translation by importing i18n function and using translation vars from GS translation files. Because it contains all needed captions.

About preview: I thought about generating a button on the article list next to delete button.
Exactly like it is with pages. I think that it shouldn't be a hassle to add generating a column with direct links to articles. I didn't mean to open articles inside admin panel, although showing their content in a jquery window or tooltip would give a fast way to preview them.
Anyway, it would be just a fancy feature.


Quote:Having 2 instances of the news plugin won't work just like that, because duplicate functions confuses GS; you'd have to rename the function names of the second instance.
Was a bit late when I was posting. I know it's not that simple, as it would have to have some changes in the code, especially paths and some of variables.
If I had to urgently have additional instance, I'd do it on my own. But there's no sense to do it for wider audience, and I like to share everything I can achieve, as long as it's easy to use by other users.


Quote:That said, you are of course free to alter the plugin in any way you want and post your contributions here, or start your own plugin. In any way, please continue giving me feedback and feature requests, as it will improve this plugin!

I'll post latest change, as I added some minor functionalities like [read more] button, or moved couple elements. Still hadn't time to mess with rewrite rules, although I was trying to understand how the link to articles is generated. I'm used to rewrite links with .html at the end so it makes it a bit messed up.

I wish I could start my own development, but my knowledge of programming is very basic, and there's no chance for me to create such news plugin alone.
Addons: blue business theme, Online Visitors, Notepad
Reply
#73
Version 1.2.2 has just been released. Due to problems with closing html tags when automatically generating article excerpts, I've now replaced this with an excerpt section in the article edit form. Here you can manually define your own excerpt (which is optional btw).

Also a support site has been launched here, where besides installation and usage instructions a working demo can be found.
Reply
#74
yojoe Wrote:About preview: I thought about generating a button on the article list next to delete button.
Exactly like it is with pages.  I think that it shouldn't be a hassle to add generating a column with direct links to articles.

Creating an extra column isn't the problem, it's the url to the article on the front page. This plugin is modular, so those urls can't be hardcoded. And since everyone uses a different setup there's no way to determine where to link to.

However, your jQuery window sounds like a good suggestion! I might look into that.
Reply
#75
If I place the code in the sidebar, it does not look good
http://neowebtime.ru/0/
Reply




Users browsing this thread: 1 Guest(s)