sNews Forum

Previous sNews versions => sNews 1.5 Final => sNews 1.5 Problem Solving => Topic started by: jclay06 on January 20, 2007, 11:15:56 pm

Title: function
Post by: jclay06 on January 20, 2007, 11:15:56 pm
on my snews site ... nothing happens when i change the value of n ... i still have the three newest posts on my site. even if i remove the number entirely. does this make sense? am i supposed to do something else ... very confused ...
Title: function
Post by: Keyrocks on January 21, 2007, 02:08:08 am
The "n" (number) was used in sNews 1.4 to set the number of articles to display from within that function-call statement in index.php. In 1.5, you can leave it empty and nothing changes because we now change this setting in one of the Admin Panels.

After clicking the ADMIN link and getting to the main Admin Panel, click the Settings link in the Site section, then click the Contents to expand that panel. In there... the field under Articles per page limit: is set (by default) to 3... which is why you always have 3 articles displaying. Change the number to whatever you want and... scroll down and save your changes.
Title: function
Post by: jclay06 on January 21, 2007, 02:40:55 am
second question then ... i am wanting to just pull the first post on the snews page up on my site's homepage ...
is there a way to make it just get the first one while leaving the actual settings on the snews page in tact? i know this may sound confusing but my friend does these little comics/drawings and he wants just the latest post on the front page of the site, and the rest to be linked to. i was hoping that i could just use the function ... but it seems that changing the setting on the snews admin page will change both to just 1 post.
i like to make things difficulit ...  :/
Title: function
Post by: Keyrocks on January 21, 2007, 02:57:48 am
The approach for this would be to create a New Page and only put what you want in that page. Then choose that page to display as the "Home" page.

Create the new page: - From the main admin panel, in the first panel... you have four choices there... and the last is... Pages: Add New. So click that link and make a new page. After saving, a link to the new page will be listed wherever your pages links are displaying... along with Archive, Contact and Sitemap.

Set the page as Home: - Go back into the same Contents panel where you found the "Articles per page" field.  Under the second field (RSS Articles Limit), there is a drop-down field beside Use Page as Home Page. Open the drop-down and your new page should be listed. Choose it... scroll down... and save. Now your new page should display as the "Home" page.
Title: function
Post by: jclay06 on January 21, 2007, 04:28:06 am
i don't know if that'll do what i want ...
maybe this will help. i'd like to show the newest post on my snews site on my regular website -> ... right now you'll see 3 because i've said it won't change (apparently b/c i'm using v1.5). i'd still like to use the snews site as the blog -> ... which i haven't had time to make look like my root site ... so is there any way to do this? if there isn't that's okay ... i'll work something out ... i just thought maybe there was an easier way i was somehow missing.
thanks for the help!
Title: function
Post by: Keyrocks on January 21, 2007, 04:02:39 pm
As I noted above (in post #2), you can set your "Articles per page" to 1 in the Content Admin Panel... but all pages and all categories will end up having just one article displayed. We don't have a way of setting the "Articles per page" for differently for each page and category yet.

With regards to posting one article from an sNews page... to display in another static (non-snews) site's page... that isn't possible since the sNews articles are generated by the center function in snews.php... dynamically (by retrieving data from the database and assembling it for display in index.php). The only way to get anything displaying from the snews.php's center function is to use its corresponding php-based function-call statement... ... and this will not work in another non-sNews page.

Question... might it be possible to have an sNews article display in your other site page... as a feed from one to the other...? I know nothing about that... but I think that it's worth exploring.