Need multipage help again! Quick help, Parahead, please.

All new Coranto Addons, updates and patches to addons, will be released here...also, get support for addons within!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Need multipage help again! Quick help, Parahead, please.

Postby adnan » Thu Apr 15, 2004 5:26 am

Okay so I'm back with just a small quick problem.

Well here's the problem. Right now I have a certain part of the news (the scroller bar ones) all on one page. I don't want it to be on one page because it looks all mushed up. Yes I can use MultiPage again and it will be seperated and I can even have headlines, BUT in order for MultiPage to work properly the way I want it so it makes the OLDEST news stories as 1 and the newest ones as like 100 (whatever-1, whatever-100) I have to set the properties of that profile to chronological order which displays oldest first. But if I were to do that, then the newest multipage headlines would be all the way at the bottom instead of the top.

Do you see what I mean? I just want to change the order in which the headlines are displayed. I want the multipage PAGES to be in chronological order, but I want the headlines to be in "newest first" fashion. Do you know how I could do that? Please help me out! Thanks so much! :)
Last edited by adnan on Thu Aug 05, 2004 2:35 pm, edited 1 time in total.
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Thu Apr 15, 2004 8:48 am

I dont use Multipage myself so if this is a stupid question, please bare that in mind, OK!? ;-)

Anyway, what I don´t understand with this addon is how to make the headlines link to the correct multipage? Is it possible to do that when you have for example 25 newsitems split up on 3 multipages? Can you produce 25 headlines all linking directly to the correct multipage? I would like to see an example of the style that can do this...
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 Parahead » Thu Apr 15, 2004 9:27 am

OK, the above was a really dumb question since we have talked about this before... Sorry for having a really short memory...

The problem then would be two things, having different sort orders for the headlines and the normal news. I think that can be achived using an addon...

The other problem would be to use the method described in the other thread, since you would have to count backwards, which would mean you have to know which number to start on from the begining. This is not that problematic information to get hold of if we are building in the same profile, but if we have one profile for the multipage and one profile for the headlines it makes life harder...

I would also suggest that you take a look at Maginot as well, where you have the ability to slice news in groups as well and making links to those sliced pages.
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 Parahead » Thu Apr 15, 2004 1:32 pm

To be able to have a different sort order for the headlines, do as I describe below. PLEASE do a compete backup of your installation before doing any modifications to your files! Also note that the phpBB forum can linebreak where there shouldn´t be any, so doublecheck that...

In cradmin.pl, find the line:
Code: Select all
['headline-number', 'Number of Headlines', "The maximum number of news items headlines will be generated for. Useful for including headlines of only the few most recent items. <b>Leave blank</b> to create headlines for all items included in this profile."],

After that line, add the *single* line:
Code: Select all
['headline-filtsub', 'Headline Sort Order', "Allows news to be sorted in an order other than the default. Note that no matter what the sort order, filtering by number will restrict the headlines to the <i>n</i> newest items.", GetSortOrdersHeadlines()],


In cradmin.pl, find the line:
Code: Select all
$Subs{'GetSortOrders'} = <<'END_SUB';

Before that line, add this sub:
Code: Select all
$Subs{'GetSortOrdersHeadlines'} = <<'END_SUB';
sub GetSortOrdersHeadlines {
 my @sortOrders = (['', 'Default (Reverse Chronological)'], ['FilterReverse', 'Chronological (Oldest First)'], ['FilterAlpha', 'Alphabetical (By Subject)'], ['FilterTrueAlpha', 'True Alphabetical (aAbBcC) (By Subject)']);
 return \@sortOrders;
}
END_SUB


In crcore.pl, find the line:
Code: Select all
$newsprofiles{"$i-headlines"} = {

After that line, add the line:
Code: Select all
'filtsub' => $newsprofiles{$i}->{'headline-filtsub'},


Now you will be able to sort the headlines in some new basic ways...
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 15, 2004 9:17 pm

wait... i don't understand what i do now.. i edited those files now how do i put them into affect? i have no idea what i just did.. lol

i went to my login on coranto.. and looked for changes on the multipage admin options and what not... couldn't find anything.. lol..

remember i want to make the multipage headlines to appear as newest first order, and the multipage PAGES to appear in chronological (oldest first) order.. ahh. lol
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Fri Apr 16, 2004 6:37 am

adnan wrote:i went to my login on coranto.. and looked for changes on the multipage admin options and what not... couldn't find anything.. lol..
Sorry, I should have been clearer about what this did. You should now have a new dropdown box labeled "Headline Sort Order" at the end of the Headlines section in the Profile adminpage.

adnan wrote:remember i want to make the multipage headlines to appear as newest first order, and the multipage PAGES to appear in chronological (oldest first) order.. ahh. lol
Yes, I know what you want to achive and this modification only takes care of the *first* of your two problems, the second one
Parahead wrote:The other problem would be to use the method described in the other thread, since you would have to count backwards, which would mean you have to know which number to start on from the begining.
is not solved by this and I don´t have a great solution for that right now either, sorry.
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 Parahead » Fri Apr 16, 2004 11:27 am

OK, I created an addon that counts the number of newsitems in a profile. The addon "Count Items" by Sumaleth couldn´t be used for this since that counts the newsitems along side the building process, this addon does it prior to the building.

http://www.parahead.com/coranto/addons? ... counter.pl
NOTE: Read the documentation for the addon!

So, by combining the modification I provided above with this addon and if you then modify the solution provided in this thread a bit and use the following example in your headline style:
Code: Select all
<PerlCode>
$NewsCounter1 = ($NCActiveCount{$ProfileName} + 1) unless($NCActiveCount{$ProfileName});
--$NewsCounter1;
</PerlCode>

<font size="2" face="arial"><b><a href="/read/00005-<Field: NewsCounter1>.shtml"><Field: Subject></a></b><BR>


Things should work the way you want it to, please report back the outcome of this, OK...
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 Parahead » Fri Apr 16, 2004 11:54 am

Sorry, the PerlCode example provided in my last post is not working as intended, this is the correct one:
Code: Select all
<PerlCode>
$NewsCounter1 = ($NCActiveCount{$ProfileName} + 1) if($NCActiveCount{$ProfileName});
$NCActiveCount{$ProfileName} = 0;
--$NewsCounter1;
</PerlCode>
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 kriko » Fri Apr 16, 2004 9:15 pm

[offtopic]I believe that Parahead deserves a reward here :P [/offtopic]
Kristjan aka. kriko
now a wireless expert
User avatar
kriko
 
Posts: 3328
Joined: Sat Feb 24, 2007 8:13 pm

Postby Parahead » Fri Apr 16, 2004 9:49 pm

kriko wrote:[offtopic]I believe that Parahead deserves a reward here :P [/offtopic]
Heh?
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 kriko » Sat Apr 17, 2004 6:39 am

Parahead wrote:
kriko wrote:[offtopic]I believe that Parahead deserves a reward here :P [/offtopic]
Heh?

That was ment as a hint to adnan, who first offered money for help. I saw that you helped him a lot and I think that if he is still willing, you ought to get something for it :P
Kristjan aka. kriko
now a wireless expert
User avatar
kriko
 
Posts: 3328
Joined: Sat Feb 24, 2007 8:13 pm

Postby Parahead » Sat Apr 17, 2004 9:24 am

kriko wrote:That was ment as a hint to adnan, who first offered money for help. I saw that you helped him a lot and I think that if he is still willing, you ought to get something for it :P
Aha, OK! Well, as you know kriko, I´m not in it for the money... ;-)

Never the less, like you say, I have put down some time on his problem so I do would like to get some kind of feedback from you adnan if you get it to work or not, also if you descide not to try the solution after all I would like to know that too, OK... :-D
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 » Fri May 21, 2004 1:20 pm

Last edited by adnan on Thu Aug 05, 2004 2:37 pm, edited 1 time in total.
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Sat May 22, 2004 1:32 pm

adnan wrote:hey sorry i haven't been in here for a while, i have been very busy with ECFAN. good news is that everything is working just how I want it
Better late than never, thanks for letting me know! :-)
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 » Mon Jun 14, 2004 7:15 pm

Last edited by adnan on Thu Aug 05, 2004 2:36 pm, edited 1 time in total.
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Next

Return to Addon Release and Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron