MultiPage HEADLINE add-on? Willing to PAY.

Post your requests for addons here, and discuss any addons in development here, as well.
Once an addon has completed development, it will be released in the "Addon Release" forum.

Moderator: Spunkmeyer

Re: MultiPage HEADLINE add-on? Willing to PAY.

Postby Parahead » Thu Apr 08, 2004 11:46 am

SrNupsen wrote:1. Set up a Maginot static profile to build all your news items
2. Set up a normal profile generating headlines linking to each static Maginot page.

Am I missing something here if I assume that Multipage with 1 item on each page = Maginot?
Yeah, I was thinking about that too, the only thing that Multipage can achive but not Maginot is the PREV|1|2|3|NEXT interlinking between the pages, don´t know if adnan uses this feature though...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby adnan » Thu Apr 08, 2004 1:52 pm

I am gonna try Parahead's new method in just a sec, but here's why I don't use the other thing..

1) I JUST found out about it, I've read about it in the addon's section but never knew what "static" pages were etc.

2) I have already spent hours and hours implementing MultiPage into my website and I have made several categories, profiles, styles, and I feel like it would be too much work to use the other thing.

3) Also when I was doing the single page items through viewnews, it would not let me use SSI to bring in my template that was on the rest of the pages. With MultiPage instead of the PREV|1|2|3|NEXT strip, I just place the SSI code which brings in the HTML template I use on all of my pages and it's wonderful.

I will post back in one second after I try Parahead's new method. :)
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Thu Apr 08, 2004 2:02 pm

It is OK, adnan! There are several ways of doing things in Coranto... :-D

Another solution for you *might* be to use the QueryFetcher addon, since you then can place a call to viewnews.cgi inside that shtml-page just as any other SSI-call... A thorow discussion about using SSI in styles when using viewnews.cgi vs when building static files can be found here. ;-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby adnan » Thu Apr 08, 2004 2:05 pm

Eh sorry if this is getting annoying, but umm.. what was I supposed to do with that code anyways? What is <Field: NewsCounter> supposed to be in the actual headline.. is it supposed to be the whatever-? Because if so, it's off on the numbers a bit. To figure out what it was for, I just pasted that code under my current style with what you had before and submitted some news items. After that the newscounter numbers also started changing each time.

I am going to assume that it is because of the repeating "code" that is causing the problems. Because one section's headlines which start at whatever-3 leaves off from another section's whatever-2. Hmm
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Dale Ray » Thu Apr 08, 2004 2:43 pm

adnan wrote:Eh sorry if this is getting annoying, but umm.. what was I supposed to do with that code anyways? What is <Field: NewsCounter> supposed to be in the actual headline.. is it supposed to be the whatever-? Because if so, it's off on the numbers a bit. To figure out what it was for, I just pasted that code under my current style with what you had before and submitted some news items. After that the newscounter numbers also started changing each time.

I am going to assume that it is because of the repeating "code" that is causing the problems. Because one section's headlines which start at whatever-3 leaves off from another section's whatever-2. Hmm


What version of Coranto are you using?

I do not have the problems you are having with the counter value being saved between every build. I am using V1.22.1.

The "field" that is created by the perl code is treated like any other field in Coranto when used in your atyle. Put the counter field (whatever you name it) where you want that value at and the value will be substituted when the style is processed.
Dale Ray
User avatar
Dale Ray
 
Posts: 1004
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Parahead » Thu Apr 08, 2004 2:51 pm

adnan wrote:What is <Field: NewsCounter> supposed to be in the actual headline.. is it supposed to be the whatever-?
Yes

adnan wrote:I am going to assume that it is because of the repeating "code" that is causing the problems. Because one section's headlines which start at whatever-3 leaves off from another section's whatever-2. Hmm
Hmmm, strange... What do you mean by "section"? How many styles and profiles do you have that uses this code? Describe how the styles are used with the profiles...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby adnan » Thu Apr 08, 2004 4:03 pm

The version of Coranto I am using.. Your Version: 1.22

Okay I have 3 main sections on my site, each section has a news section (this is where Coranto comes in). I actually use Coranto in many ways, but only once in each section for MultiPage.

Each section that uses MultiPage has it's own profile and style and each profile is linked with it's own style. So I don't use the same style for multiple profiles, I have different ones for each. Do you think I should have them ALL share one style opposed to sharing many different styles with the same code in each?

To answer the question, I have 3 styles/profiles using the code you gave me. And where it says "News Style" to use in the profile, I click a seperate one for each one of my three sections/profiles.
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Thu Apr 08, 2004 4:35 pm

adnan wrote:To answer the question, I have 3 styles/profiles using the code you gave me. And where it says "News Style" to use in the profile, I click a seperate one for each one of my three sections/profiles.
Then this should work.... The $ProfileName part is there to prevent this behaviour. Try this in your style and report back the outcome:
Code: Select all
<PerlCode>
  $NewsCounter = ++$countitems{$ProfileName};
</PerlCode>

Current profile is: <Field: ProfileName>
Current count is:<Field: NewsCounter>

The current profile should be different between your different sections, and ofcourse the counting should start from 1 at each one of them. I havn´t used Multipage myself, so I don´t know if $ProfileName maybe is not accesible when building news in a Multipage profile. I´ll download it and take a look as well...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby adnan » Thu Apr 08, 2004 5:49 pm

I don't know what the hell is wrong with this thing. When I add the ProfileName piece to the news style, it counts the number of items there are in that profile and that starts counting from that number. So if there were 4 news items, the headlines would start at whatever-5.shtml.

So I got rid of the ProfileName and everything was looking good. I could build news, submit news, but when I would DELETE a news item the order would get thrown off again.

So then somehow I ended up keeping the ProfileName piece on one of the news styles for ONE section of my site and not the other. When I did this, no matter WHAT I did in the section withOUT the ProfileName in the news style, it would always work. I could build, delete, edit, you name it. But the section WITH the ProfileName in the news style was still counting off, it only helped to keep the other one in shape.

So I don't think ProfileName is the way to go since it does NOT start counting at 1, but the number after the number of news items there are.

Ahh I am sorry for all this craziness and just a reminder I appreciate all of your help. :)

Any idea what I should do now? lol
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby adnan » Thu Apr 08, 2004 5:56 pm

And again I have noticed that whenever the numbers do get screwy within all of my sections, if I just go to modify ONE news item from that category/profile and press submit the numbers (whatever-?.shtml) are fine in all the sections until you go to delete something again.

When you would delete something, one section/profile would start counting from the other. So if one section of mine had 4 news items, the other one would start counting at whatever-5.shtml. This only happens when you delete a news item, but then again when you go to modify and submit again, the numbers are fine.
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby adnan » Thu Apr 08, 2004 6:01 pm

I'm just gonna post as much information as I possibly can so you see a better picture.

I don't understand why they profiles connect with eachother.. I don't have any overlapping names of styles, profiles, or anything.. I mean doing the basically "re-submitting" I call it (going to modifying news, editing a file, and pressing submit) is a small price to pay and I don't mind.

But if there's a way where I don't have to do that, that would be greaT! :lol:
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Thu Apr 08, 2004 6:07 pm

Did you add the "Current Profile is"-thing? Did it show different names for the different sections?

Anyway, try using this in your style:
Code: Select all
<PerlCode>
  $NewsCounter = $mpFileCount{$i};
</PerlCode>

<Field: NewsCounter>
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby adnan » Thu Apr 08, 2004 6:12 pm

Yes it showed the names of all the different profiles, but it didn't work really. Let me try the thing you just posted, brb
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby adnan » Thu Apr 08, 2004 6:14 pm

Hmm that one didn't do anything at all.. When it made the headline stuff it just came out as:

whatever-.shtml , there was no number. This is what I had in my style:

Code: Select all
<PerlCode>
  $NewsCounter = $mpFileCount{$i};
</PerlCode>

<font size="2" face="arial"><b><a href="/read/00005-<Field: NewsCounter>.shtml"><Field: Subject></a></b>
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Thu Apr 08, 2004 6:29 pm

adnan wrote:Hmm that one didn't do anything at all.. When it made the headline stuff it just came out as:

whatever-.shtml , there was no number. This is what I had in my style:

Code: Select all
<PerlCode>
  $NewsCounter = $mpFileCount{$i};
</PerlCode>

<font size="2" face="arial"><b><a href="/read/00005-<Field: NewsCounter>.shtml"><Field: Subject></a></b>
OK, then we do it this way... Try using *different* names in every style, so in style 1 used by profile 1 you use this:
Code: Select all
<PerlCode>
++$NewsCounter1;
</PerlCode>
<Field: NewsCounter1>

and then in style 2:
Code: Select all
<PerlCode>
++$NewsCounter2;
</PerlCode>
<Field: NewsCounter2>

and so on...
Last edited by Parahead on Thu Apr 08, 2004 6:30 pm, edited 1 time in total.
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

PreviousNext

Return to Addon Development and Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron