Plugin: Simple News

Vaska A / 2007-06-24 15:07:07   

This is the first official 'plugin' for Indexhibit. There are already a small collection of them that will be released over time.

Plugin: Simple News

It creates a news/blog-like output of information within a single page. You will see a publish date and a link to the actual page.

Installation:

Download the 'plugin.simple_news.php.zip' file to your desktop and unzip. Upload the 'plugin.simple_news.php' file to your site/ndxz-studio/site/plugin folder.

On the page you wish to display your news, insert this code into the text area:

<plug:simple_news number />

'Number' will represent the section where you will place your news pages. You can get this by looking up the section information and checking the 'id' in the url.

When you publish a news page:

Before you publish the news page be sure to 'hide' the page - you will find the hide functionality in your page settings. When the page is hidden it will not appear in your Index list but it will appear on the news page.

Exhibit images do not work with the simple news plugin.

metel_hands / 2007-06-25 19:23:12   

Vaska do you have an example (a visual) around of this plugn in action?
I tried it out but nothing happend?

Vaska A / 2007-06-25 19:29:15   

--

metel_hands / 2007-06-26 01:14:45   

Bingo. thank you

Vaska A / 2007-07-15 11:16:48   

Updated...works now with systems that have mod_rewrite disabled.

Vaska A / 2007-07-15 11:57:02   

Demo Page (at the Indexhibit demo site)

Joana / 2007-07-19 13:06:54   

Hey I tried to access my plug in folder under this:
http://joananiemeyer.com/ndxz-studio/site/plugin/
and i get this message...
No direct script access allowed

What am i doing wrong?

Vaska A / 2007-07-19 13:31:24   

You don't bring it up that way...what are you trying to do?

Joana / 2007-07-19 16:52:06   

i want to install the plugin

Vaska A / 2007-07-19 18:02:46   

Download the 'plugin.simple_news.php.zip' file to your desktop and unzip. Upload the 'plugin.simple_news.php' file to your website/ndxz-studio/site/plugin folder.

Suprb / 2007-07-20 19:04:35   

The date thingie doesn't work.
As soon as I wake up every morning, all my news posts has the same date (as of today).

Vaska A / 2007-07-20 23:49:26   

I thought I updated that? Didn't I? When did you download it?

Suprb / 2007-07-21 10:29:05   

Hmm... 4-5 days ago.

Vaska A / 2007-07-21 11:26:21   

Suprb...I don't understand what you are getting at.

goneone / 2007-07-21 23:30:42   

hey Vaska,

I tried to install this and it's not working for me.

i put the plug in in the correct folder path (pluggins)

i copy this code in to a news page i created under my info section.

i put this code on the news page:

now here is where i get stuck. i do not understand when you can say you can get the number from the URL. is it the URL where the news page is created... for me i see id=32. so do i put the "id" parte, or just the 32.

so then in my text area on the news page, i have this

from here under Additional Settings, i set the "Hide Page from Index" to off.

now if i followed your instructions correctly, i should be able to post news and it will be displayed with a link, date and time. am i doing this in the news page, so the most top area of the text area always has the plug in call?

let me know what i am missing.
thanks man.

Vaska A / 2007-07-21 23:58:19   

It's not right. You only need the number. But, you need to go into "Settings"...then choose the section you want and get the id from there. If it's the "info" section, the id is probably 1.

Suprb / 2007-07-22 08:14:29   
Suprb...I don't understand what you are getting at.

I downloaded the News plugin that is listed under Downloads 5-6 days ago.

I installed it and every post had the same date.

I opened the source file and added "pdate" at the "$pages = $OBJ->db->fetchArray" string and now it works.

mejo / 2007-07-23 13:13:41   

Hi Vaska,

Downloaded and using the news feature. Good work. I was to back date some news is that possible with this version?

Many tanks,

Will

Vaska A / 2007-07-23 14:47:47   

Not really. But, if you aren't afraid of PHPMyAdmin you could go in an manually adjust the pdate cells to suit your needs.

mejo / 2007-07-27 11:41:56   

What about a basic comments form for the news/"blog" feature...?

Vaska A / 2007-07-27 13:13:38   

Sure. Go ahead and develop that and release it back to everybody open source.

Vaska A / 2007-07-27 13:55:40   

You know, that is also why I released the "Iframed" plugin. You can install WP or TextPattern or whatever...and them simply display them in an iframe on your site.

The plans to do a blog module are more or less dead now. Don't have time for it.

And besides, I still don't see a need for commenting on a portfolio website.

nils / 2007-08-19 19:37:19   

How can I limit the entries per page?

Vaska A / 2007-08-19 22:21:22   

Yes, we need to add this...soon...there will be a bunch of updates to many things...and Flickr. ;)

Let's see if I can post all of this...lines 12-25...


function simple_news($id=0, $limit=6) { $OBJ =&#38; get_instance(); global $rs;

if ($id == 0) return;

$pages = $OBJ->db->fetchArray("SELECT user_format, user_offset, url, title, content, pdate
FROM ".PX."objects
INNER JOIN ".PX."users
WHERE status = 1
AND hidden = 1
AND section_id = '$id'
ORDER BY ord ASC, pdate DESC
LIMIT 0,$limit");

Then your plugin would look like:


<plug:simple_news 5,6 />

First one being the section...second one being the number of entries to show (will always take the most recent $limit entries.

Vaska A / 2007-08-19 22:22:10   

Blorb...

I just uploaded an updated version that has the limit in there (it's in the downloads now). You can change the value in the plugin if you want, but it's default is 6.

;)

nils / 2007-08-20 08:56:39   

... works perfect! Thanks Vask!

o. / 2007-08-30 07:11:34   

Great app. thanks Vaska et al.

Quick question about the news plugin... I read the above but am unsure what exactly happens when you pass the default limit of 6 entries. Does your earliest news entry disappear from the page?

If so, what is a good way of keeping past entries available without having an enormously long scrolling page ...to use the archive plugin? Is that its purpose?

My apologies if the answers to these questions are obvious. I'm just trying to understand the logistics of these 2 plugins. Cheers.

Vaska A / 2007-08-30 07:45:18   

1. Yes, it disappears.
2. Perhaps the archive plugin?

In another week I'll be putting in some serious time on Indehxibit...dealing with this plugin and some surprises as well (one of which will resolve this too).

;)

andw55 / 2007-11-28 17:34:49   

(probably i am just missing something obvious) -> Where is the link to download it?

Vaska A / 2007-11-28 19:55:02   

Download page.

zm / 2007-11-30 18:38:21   

Vaska—And besides, I still don't see a need for commenting on a portfolio website.

i gotta agree with you on this...

indexhibit is like a your sketch pad in art class, we all have the same sketch pad, its what's on your sketch pad, your artwork, expressions, emotions, etc...

no one wants to read your diary aka blog

IMO keep indexhibit as simple as possible with as much focus on the art work, and not on theweb experience

Tarsh / 2007-12-24 18:16:54   

I agree with zm for my use personally, but having some options available may widen the user base and be of more use to others.

stuttter / 2008-01-28 14:17:00   

hi (first post)
firstly wanted to say how great indexhibit is and thanks for putting it together.

question, is there a way of bringing thumbnails into simple news?

thanks

Vaska A / 2008-01-28 14:58:08   

No. It would cause a whole mess of problemms...the simple news plugin might be discontinued soon though as we have a simple blog module coming along now.

stuttter / 2008-01-28 15:57:48   

thanks for getting back so quickly.

will we be able to add pics in the simple blog module?

also (don't want to sound pushy) do you have a possible release date?

cheers

Santi / 2008-02-12 19:59:53   

i really seem stupid, but where the hell do i download this?

Vaska A / 2008-02-12 21:17:40   

From the download page.

EnglishMack / 2008-02-14 23:59:01   

Hello Vaska, first of all - thanks for the time you put into this.

Basically my problem is that when I make a news post, it always double posts, as an example..

new

would end up looking like..

post number one
14 February 2008

new

» Permalink

new

--

Any idea's what I may be doing wrong here ? I followed everything to the letter..

Thanks,
M

EnglishMack / 2008-02-17 00:20:12   

Hello Vaska.

I have followed all the steps but it doesn't seem to be working?

Is there anything that's commonly missed by people?

m9dfukc / 2008-02-18 13:31:42   

hi Vaska,

I don't get it - where can I download your simple news plugin? seems that i need glasses :)

simon / 2008-02-18 13:41:33   

on the downloads page,
it's the last one ;)

m9dfukc / 2008-02-18 14:12:50   

ah ok,nice
much thanks

mortenengel / 2010-01-09 12:55:08   

Hi,
Where in myphpadmin is it possible to change the date of an entry?

ps / 2010-01-09 17:42:06   

look for ndxz_objects..
I don't know what happens to the order of things if you change it though, so good luck mate! :)

cheers

mortenengel / 2010-01-09 19:19:04   

thanks ps,
but I think it's a bit too technical for me. Afraid to mess anything up.

AandM / 2010-01-13 00:47:40   

Hi,

I have the same problem as EnglishMack. The text I entered as news repeats under the permalink. Also, all new posts get grouped into the same news section (no new date or post).

What have I done wrong?

Here is my site: LINK

rickykappa / 2010-01-14 18:21:18   

Hello!
It seemed quite simple, but I was always missing the point... I've finally found out how to make it work, and thought to add a post to the forum, to explain how to use simple_news plugin to other folks so dummy as I am ;-)
So here's a step by step chronicle:
1. I assume the plugin is already in the correct folder, as the first step of Vaska's top post
2. so what I want to get is a NEWS section, therefore I go to Exhibits admin > Settings > Create new section
3. create a NEWS section, in my case I've set the Projects Section to Off > press Update
4. take note of the section id number at the end of the url in the browser address field, that's the number I need later
5. now in the main settings window I want to create a > new exhibit, which I assign to the NEWS section (obviously that's my choice, I'm only reporting what I did)
6. editing this exhibit: this will be the news container page, here must paste the code

  1. <plug:simple_news section_id_number />

, where section_id_number is that in step #4
7. save and publish the exhibit
8. back to the main settings window > create a > new page (the Exhibition Name will be the post's title) > assign to the NEWS section
9. editing this exhibit (this will be the first new posted): write here the post, click on the Additional Settings in the right bottom corner > "Hide Page from Index" set to Off > Save and publish
10. done, only need to repeat step 9 for every new post

Be aware that this worked for me as my indexhibit site is organized by sections, so I don't know how different is the process if you've got chronological order.
I hope this can help...

AandM / 2010-01-14 23:19:11   

Yeah!

Thanks so much. Worked perfectly!

matthewrp / 2010-01-17 20:45:47   

rickykappa-could you please post your url? I followed the steps but the news feed was just like having another 'projects' section, i thought it would be like a micro-blog?

thanks for the explanation!

rickykappa / 2010-01-18 16:11:31   

hi matthew, sorry but I'm still playing in the backstage, for some reasons -too long to explain- I'm not going to publish my url for some time, my apologies...
but in the other hand the link alex provided before my post is perfectly working! ;-)

This thread has been closed, thank you.