#################################################################################
##
##        PSnews - Copyright (C) 2003 Rich Kavanagh
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or any later version which may be found here
## http://www.opensource.org/licenses/gpl-license.html
##
## All copyright notices regarding PSnews must remain
## intact in the scripts and in the outputted HTML
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
## Or visit: http://www.opensource.org/licenses/gpl-license.html
##
## Support for PSnews can be obtained from the support forums at:
## http://psnews.sourceforge.net
## or from irc.barrysworld.com in channel #PSnews
##
#################################################################################


Hi and welcome to PSnews - The Free Content Management System

Well, straight on with it, first things first, upload every single file in the zip file to your host or server, then browse to http://www.yoursite.com/PSnews_Login.asp

Login using this information:

Username: admin
Password: admin

Once logged in, create a new member for yourself with full access (ie. tick all the boxes) then Log Out and log back in using the new member information you just created. You can now delete the admin member. Once you've done this, goto News and add a new news article. Ok, done all that ? - Now onto how to incorporate PSnews into your site. PLEASE backup any files you alter (either PSnews or your own site files!).

At the bottom of this text file is a bog standard web page which we will use as an example. If you open up your existing news page, there are two lines you need to insert, these are:

<!--#INCLUDE FILE="PSnews_StartNews.asp"-->

and

<!--#INCLUDE FILE="PSnews_EndNews.asp"-->

Now where exactly you insert them is up to you. What you have to bear in mind is that anything contained within those two lines is looped a certain amount of times. The amount of times it gets looped depends on what value you have given strShowHowManyNewsPosts in the PSnews_Config.asp file.

Using the example below, you will see that everything within those two lines added gets looped x amount of times, therefore creating a new html table for each news item.

You will get a better idea of how this loop works by uploading all the files in this zip file and going to http://www.yoursite.com/PSnews_Site1.asp then viewing the source code for the page.

Ok, now it gets a little tricker. You now need to define in your webpage exactly where you'd like each field from the database to be displayed.

It's not too tricky, as the variable names are self explanetory (sort of).

What you have is a set of variables. Each variable contains some information relating to the news post, taken from the database. For example:

<%=ShowNewsHeadline%>
 Contains the Headline for your news article, example:
  <b>:::&nbsp;<%=ShowNewsHeadline")%></b>

<%=ShowNewsBody%>
 Contains the actual body/content of the news article, example:
  <span class="something"><%=ShowNewsBody")%></span>

<%=ShowNewsDateStamp%>
 Contains the date the news article was posted, example:
  <i>Posted on <%=ShowNewsDateStamp")%></i>

<%=ShowNewsTimeStamp%>
 Contains the time the news article was posted, example:
  <i>Posted at <%=ShowNewsTimeStamp")%></i>

<%=ShowMemberNickName%>
 Contains the Nick Name of the member who posted the news article, example:
  <u>Posted by: <%=ShowMemberNickName")%></u>

<%=ShowMemberEmailAddress%>
 Contains the email address of the member who posted the news article, example:
  <a href="mailto:<%=ShowMemberEmailAddress%>" class="link"><%=ShowMemberNickName%></a>

<%=ShowNewsID%>
 This Contains the ID number for direct article linking, example:
  <a href="?NewsID=<%=ShowNewsID%>" target="_blank">Link To This Article</a>

Printer Friendly articles
 This is how you would add a Printer Friendly link to a news article:
  <a href="PSnews_PrinterFriendly.asp?NewsID=<%=ShowNewsID%>" target="_blank">Printer Friendly</a>
  



You don't have to use all of these variables at the same time, what you use depends on the current layout of your existing website.

When you go to place these variables in your website, they're quite straight forward to use. Remember, each variable contains information for each news post in the loop.

If for example, your current news page looks like:

  <center>
   <table width="80%">
    <tr>
     <td>
      <b>Napster Go Bust !!!!</b>
      <br>
      23rd August 2002
      <br><br>
      <table width="100%">
       <tr>
        <td>Today, Napster the mp3 sharing giant went bust, la de la, blah blah blah, etc, etc.<br>We can only hope someone starts a private peer 2 peer network for members only so we can continue sharing our goodies. La de la, blah blah blah.<br><br></td>
       </tr>
       <tr>
        <td align="right" colspan="2" valign="bottom">
         Posted at 11:23 by <a href="mailto:your@email.com">Jonny Briggs</a>
        </td>
       </tr>
      </table>
      <br><hr width="80%"><br>
     </td>
    </tr>
   </table>
  </center>


You would need to alter it like so:


<!--#INCLUDE FILE="PSnews_StartNews.asp"-->
  <center>
   <table width="80%">
    <tr>
     <td>
      <b><%=ShowNewsHeadline")%></b>
      <br>
      <%=ShowNewsDateStamp")%>
      <br><br>
      <table width="100%">
       <tr>
        <td><%=ShowNewsBody")%><br><br></td>
       </tr>
       <tr>
        <td align="right" colspan="2" valign="bottom">
         Posted at <%=ShowNewsTimeStamp")%> by <a href="mailto:<%=ShowMemberEmailAddress")%>" class=Font8Blue><%=ShowMemberNickName")%></a> - <a href="?NewsID=<%=ShowNewsID%>" target="_blank">Link To This Article</a> - <a href="PSnews_PrinterFriendly.asp?NewsID=<%=ShowNewsID%>" target="_blank">Printer Friendly</a>
        </td>
       </tr>
      </table>
      <br><hr width="80%"><br>
     </td>
    </tr>
   </table>
  </center>
<!--#INCLUDE FILE="PSnews_EndNews.asp"-->

Basically, you're replacing your current content, names, dates, times, email addresses, news body/content etc, with variables. Remeber you only need to do this once. If you want to display the 10 most recent news articles on your website, you don't need to add this 10 times as it will get automatically looped 10 times, you only need this information in your webpage once.

You may then upload your altered webpage to your host and goto http://www.yourwebsite.com/whatever-the-file-is-called.asp to view your handy work.


We on the PSnews team need your input;

How tricky did you find this to do ?
How long did it take you ?
Suggestions for modifications ?
Etc.


Misc Info:

There is a transparent GIF in the zip file called PSnews_img_powered_by.gif - I'd be grateful if you'd place it on your site somewhere (you don't have to though) using this code: 

<a href="http://psnews.sourceforge.net" target="_blank"><img src="http://psnews.webdevelopments.net/PSnews_img_powered_by.gif" width="90" height="30" alt="Powered By PSnews"></a>

The Access Database Password is: psnews

Those of you that are interested can edit PSnews_Config.asp to suit your site better (don't forget to backup first!)

To use Microsoft SQL Server 2000, (you may need to run Enterprise Manager locally) create a new database called PSnews then right click on the database called PSnews and goto All Tasks, Restore Database. Select "From Device", then click on Select Devices, then Add. In the filename box, enter the FULL path to the PSnews_Microsoft_SQL_Server_DB.MDF (please note, this is CaSe SeNsItIvE) file you've uploaded to your SQL server and click on OK 3 times. You'll get a popup saying "Restore of database 'PSnews' completed successfully. You then simply need to edit the info in PSnews_Config.asp to suit your SQL server.











<!----------     SAMPLE WEB PAGE STARTS BELOW THIS LINE     ---------->



<html>
 <head>
  <title>PSnews - News</title>
 </head>
 <body>
  <!--#INCLUDE FILE="PSnews_StartNews.asp"-->
  <center>
   <table width="80%">
    <tr>
     <td>
      <b><%=ShowNewsHeadline")%></b>
      <br>
      <%=ShowNewsDateStamp")%>
      <br><br>
      <table width="100%">
       <tr>
        <td><%=ShowNewsBody")%><br><br></td>
       </tr>
       <tr>
        <td align="right" colspan="2" valign="bottom">
         Posted at <%=ShowNewsTimeStamp")%> by <a href="mailto:<%=ShowMemberEmailAddress")%>" class=Font8Blue><%=ShowMemberNickName")%></a> - <a href="?NewsID=<%=ShowNewsID%>" target="_blank">Link To This Article</a> - <a href="PSnews_PrinterFriendly.asp?NewsID=<%=ShowNewsID%>" target="_blank">Printer Friendly</a>
        </td>
       </tr>
      </table>
      <br><hr width="80%"><br>
     </td>
    </tr>
   </table>
  </center>
  <!--#INCLUDE FILE="PSnews_EndNews.asp"-->
 </body>
</html>



<!----------     SAMPLE WEB PAGE ENDS ABOVE THIS LINE     ---------->





