Author Topic: Limit News Items with links to more  (Read 4327 times)

0 Members and 1 Guest are viewing this topic.

Offline kmmcdan

  • Jr. Member
  • **
  • Posts: 21
Limit News Items with links to more
« on: January 10, 2007, 08:46:01 PM »
In the example here:

http://www.newsscript.co.uk/cgi-bin/newsscript.pl

And here:

http://www.newsscript.co.uk/cgi-bin/newsscript.pl?headlines=3

It shows how you can limit the number of news items on a page and then below they have links to go on to other pages.  When I add

?headlines=3

to my link it does limit the news items to three but it does not automatically add the links below.  How is this accomplished? 

Thank you.

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Limit News Items with links to more
« Reply #1 on: January 11, 2007, 04:24:36 AM »
Just tried your headlines=3 link and it looks ok to me?


Offline Jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 1018
    • slipdex
Re: Limit News Items with links to more
« Reply #2 on: January 11, 2007, 04:15:25 PM »
We would like to see a link to your specific site.  The demo version on the site is of course working, but if we can see your live site maybe we can figured out what might be wrong.

Jason
Founder of www.slipdex.com

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Limit News Items with links to more
« Reply #3 on: January 11, 2007, 04:22:08 PM »
Also a link to your template...

Offline kmmcdan

  • Jr. Member
  • **
  • Posts: 21
Re: Limit News Items with links to more
« Reply #4 on: January 15, 2007, 10:22:01 AM »
Ok here is the link, this is only a test page trying to get the script up and running:

http://www.tibetanmastiffbreeder.com/e_litter/

And I am using a virtual include to the script like so:

<!--#include virtual="/cgi-bin/newsscript.pl?headlines=3"-->

And here is a link to my template:

http://www.tibetanmastiffbreeder.com/news.shtml

Also I am not able to get the images in my template to work unless I use full URL's.

Thank you!

Offline Jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 1018
    • slipdex
Re: Limit News Items with links to more
« Reply #5 on: January 15, 2007, 10:39:15 AM »
The images not showing in your template are because of how your paths are noted in your template.  you may need to ad "../" in front of your image files in order to go up one directory.  Of course in the template for good measure I always use full url's, sometimes overkill, but always know it's going to work.

The rest of it I am not quite sure why you do not get additional links.

Jason

Founder of www.slipdex.com

Offline smc

  • Full Member
  • ***
  • Posts: 45
    • EternityWhere.com
Re: Limit News Items with links to more
« Reply #6 on: January 15, 2007, 10:39:37 AM »
Did you trying setting the number of headlines within the script to 3 and then doing a straight call using your include as in;

<!--#include virtual="/cgi-bin/newsscript.pl"-->

See if that fixes the problem.

Offline kmmcdan

  • Jr. Member
  • **
  • Posts: 21
Re: Limit News Items with links to more
« Reply #7 on: January 15, 2007, 10:54:35 AM »
Can you tell me how to note it in the script?  And I assume you are referring to the pl script?

Thank you!

Offline smc

  • Full Member
  • ***
  • Posts: 45
    • EternityWhere.com
Re: Limit News Items with links to more
« Reply #8 on: January 15, 2007, 11:03:57 AM »
Yes.  Try changing my $records_per_page = 3  in the settings as below.

##########################################################
# Page Selector
my $textPrevious                  = "Previous";
my $textNext                      = "Next";
my $pageSelectorRange             = 10;
my $records_per_page              = 5;
##########################################################

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Limit News Items with links to more
« Reply #9 on: January 15, 2007, 11:04:19 AM »
Number of headlines per page

my $records_per_page = 3;

Offline kmmcdan

  • Jr. Member
  • **
  • Posts: 21
Re: Limit News Items with links to more
« Reply #10 on: January 15, 2007, 11:54:42 AM »
Ok I realized that it's only the Extra version that allows this option and I was using the free version.  I now have the Extra version and I entered in all the identical information into the new Extra script that I had in the old one and now I am getting the error:

[an error occurred while processing this directive]

Is there something else I need to do when upgrading to the Extra version other than simply replacing one newsscript.pl with the other?

Thank you

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Limit News Items with links to more
« Reply #11 on: January 15, 2007, 12:05:51 PM »
Did you enter the identical information, or did you copy/paste over the existing options block of the XTra version?

Also, what do you get when you call the script by its URL?

Offline kmmcdan

  • Jr. Member
  • **
  • Posts: 21
Re: Limit News Items with links to more
« Reply #12 on: January 15, 2007, 12:27:07 PM »
I entered the exact information.  I did copy and past but only for each individual parameter.

And I am getting a 500 internal server error along with:

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I made sure that the path to perl and the CHMOD on the file was correct so I don't know what is going on.


Offline kmmcdan

  • Jr. Member
  • **
  • Posts: 21
Re: Limit News Items with links to more
« Reply #13 on: January 15, 2007, 12:38:35 PM »
Ok, I still don't know what was wrong but I just started from scratch and now it is working.

Thank you for all of your help.

Offline kmmcdan

  • Jr. Member
  • **
  • Posts: 21
Re: Limit News Items with links to more
« Reply #14 on: January 15, 2007, 12:42:56 PM »
One more question,

I have it working now and I have 3 news items with links to more pages.  However when you click to go to the additional pages it does not stay in the context of the page like it does in this example:

http://www.newsscript.co.uk/cgi-bin/newsscript.pl

Mine shown here:

http://www.tibetanmastiffbreeder.com/e_litter/

Goes to the plain script page and is not surrounded by the template. 

Thanks again!