Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: 1 ... 3 4 [5] 6 7 ... 10
 41 
 on: September 11, 2014, 09:45:43 AM 
Started by GerryMacOstair - Last post by sibas
Nice one! I like your single page and I added to The list;D

 42 
 on: September 11, 2014, 03:11:33 AM 
Started by GerryMacOstair - Last post by GerryMacOstair
This is an answer of sorts to this thread http://snewscms.com/forum/index.php/topic,9055.0.html by nukpana. There certainly are different approaches thinkable to create single-page websites w/ sNews, but I do think that this one is the simplest (if probably not the most elegant one).
Use "articles" to feed your content to the system (database). Allow as many articles to be displayed on your home page as you need. Don't let the titles be displayed so you have more control over structure and layout. Write the titles and content directly into individual articles, and wrap them with the structure tags necessary to keep the page valid. For the standard sNews package use
Code: [Select]
<div>, for HTML5 variants use
Code: [Select]
<section> and
Code: [Select]
<article>. This way, you are not at risk of making a mess of the engine file (snews.php).

Your various chunks of content will be displayed via the "center" function. You can sort them easily via the "time of publication" feature (which you enable but don't want to have displayed). Add "id" values to your
Code: [Select]
<section> tags (HTML5) or your individual outer
Code: [Select]
<div> tags (XHTML) so you have anchors for the navigation.

If you want a contact form displayed on this same page (which you probably will), create another article, set the time of publication to the earliest date (if you want it to appear at the end of the page), and insert the proper structure tags and use the "insert function" available from the editor. Insert "contact" (w/o quotes) in the first popup dialog and leave the second one empty. Remove the function shortcuts you don't need on a single page website (breadcrumbs/pages/articles/comments/rss links). Design the page with CSS.

That much for the easy part. Now, there is a peculiarity of single page sites that needs some consideration as it usually is not an issue in standard packages. We don't have a single "contact page" that would be displayed, once some visitor navigates to this form. This will cause a fine mess as soon as the form will be submitted. Whether the message will be sent successfully or an error occurred, there will appear a response to inform the visitor as to whether the process was completed or not. This message would appear on the contact page. Since we miss it, it appears in the area governed by the "center function" (where all our other chunks of content used to be). This may cause the visitor to get stuck, especially in cases of failed transmission. The "return" link would point to the contact page we don't have.

To mend this, it is, after all, necessary to fiddle (a little bit) with the engine file. So make a backup of what you already have, and open snews.php in your ASCII editor of choice.
Look for this string
Code: [Select]
function contact() and scroll down until you get to the notification
Code: [Select]
'contact_sent' and remove the word
Code: [Select]
home from this code line so that you have only the two single quotes left. The line will then end in
Code: [Select]
sent'),'');.
The scroll further down to find the notification
Code: [Select]
'contact_not_sent' and remove the word
Code: [Select]
contact, so this line also ends in
Code: [Select]
sent'),'');. Then set your cursor before the semicolon and add
Code: [Select]
.' '.l('message_error'). This will put out a (somewhat) comprehensible choice of reasons for the failure to the visitor. Save the file.
Now open the file "EN.php" in your "lang" directory and find
Code: [Select]
$l['contact_sent'] and add
Code: [Select]
<a href="./">Please reload this page</a> to the message. The go to
Code: [Select]
$l['message_error'] and do the same. This will give inexperienced visitors an easy way to make the page display as it should again.

As it turned out, this description is quite lengthy. This was not my intention. Here's hoping this little tutorial will be useful to someone.
Oh, and if you get stuck with a series of failed message submissions, you might want to try this; at any rate, it did work for me.
Go to snews.php and find in
Code: [Select]
function contact() this line
Code: [Select]
&& $name && $mail && $message && checkMathCaptcha()) { and change it to read
Code: [Select]
&& $name && $mail && $message && checkMathCaptcha==true) {.
Here's visual proof: http://macostair.net/

Regards, Gerry

 43 
 on: September 10, 2014, 11:10:10 AM 
Started by Saulis - Last post by abbevalle
Thank you Doug,

I will take a look inside the code and see what could be done.

 44 
 on: September 09, 2014, 03:46:25 PM 
Started by Brian - Last post by Keyrocks
I also kinda figured that sNews can be edited so well that you can completely hide the fact that your running sNews by renaming the engine file etc so it gives a more "I made this" feel.

Yes, it is easy to mask the origin of your sNews engine, and it is relatively easy to customize the CSS styling for the comments and contact form to appear any way you want it to as well.

Thanks for sharing your mock-up - looking good.  :)

 45 
 on: September 09, 2014, 01:26:18 AM 
Started by Brian - Last post by Brian
I also kinda figured that sNews can be edited so well that you can completely hide the fact that your running sNews by renaming the engine file etc so it gives a more "I made this" feel. The only way I can tell a site is running sNews is by seeing how comments and the contact form is handled. Seems like sNews generic form handling just sticks out to me. After I get my basics done and up ill probably go back and try to be a bit more detailed in my mockup. Im still working alot on this but just to show how simple and sloppy I did this the site is http://www.deusuno.com once i open ill delete the url out of this posting but just wanted to show for laughs.

 46 
 on: September 08, 2014, 04:11:31 AM 
Started by Brian - Last post by Keyrocks
Well I decided to utilize sNews and have been working all day dusting off what HTML and CSS I could remember and I have to say it took me 4 hours just to remember how to do a header and my CSS is about as sloppy as sloppy could ever imagine but thankfully im the only one that will ever work with my code haha. Its taken me nearly a total of 12 hours just to write the markup of the simplest design I have ever done and im still not finished. I use to be able to markup and style in just a couple hours. Feel like im learning disabled or something.

 ;D  ;D  ;D - I know the feeling. It's been some time since I've done any templating with CSS as well, the last one I did was making significant modifications to a WordPress template (for a client's WP site) about 20 months ago.

While sNews is an *older* PHP/MySQL site engine, it's the CSS and HTML used for your template that will govern how well the template displays in browsers, including Google Chrome. Keep your HTML and CSS compliant and you should be fine.

 47 
 on: September 08, 2014, 04:02:05 AM 
Started by Saulis - Last post by Keyrocks
Thank you Doug,
It seems nothing is happening with this amazing CMS (sNews) anymore, are there any plans for future versions?

You're welcome. Nothing new has emerged since the last updates were made to 1.7.1. There were plans to develop a new 2.0 version, starting with fresh code (from scratch) but nothing has materialized as yet .... mainly because those of us who've (voluntarily) stayed with the project have all become busier with other projects. But anyone is free to bring something forward - anytime.  :)

and is this snews1.7MM confirmed by you guys to be stable and usable in production?

I haven't gone through it and I don't think anyone else has either, but it is based on sNews 1.7. You could to a file-search to see of the patches made to the last updated version of 1.7.1 have been made to the MM version and, if there are any missing, you could add them in.

and I am also interested to take a look at the code for sNews 1.7MU, do you know where I can find it?

Here's a copy of sNews 1.7MU - the package originally made available by HA100.

 48 
 on: September 08, 2014, 03:55:29 AM 
Started by Brian - Last post by Brian
Well I decided to utilize sNews and have been working all day dusting off what HTML and CSS I could remember and I have to say it took me 4 hours just to remember how to do a header and my CSS is about as sloppy as sloppy could ever imagine but thankfully im the only one that will ever work with my code haha. Its taken me nearly a total of 12 hours just to write the markup of the simplest design I have ever done and im still not finished. I use to be able to markup and style in just a couple hours. Feel like im learning disabled or something.

 49 
 on: September 06, 2014, 02:16:16 PM 
Started by Saulis - Last post by abbevalle
and I am also interested to take a look at the code for sNews 1.7MU, do you know where I can find it?

 50 
 on: September 06, 2014, 02:06:10 PM 
Started by Saulis - Last post by abbevalle
Thank you Doug,

It seems nothing is happening with this amazing CMS (sNews) anymore, are there any plans for future versions?

and is this snews1.7MM confirmed by you guys to be stable and usable in production?

Thank you so much

Pages: 1 ... 3 4 [5] 6 7 ... 10