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

Postby Dale Ray » Thu Apr 08, 2004 6:30 pm

adnan wrote: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.


In the style for each profile make the variable for the counter unique (a diffferent variable for each style).

When you say that the numbers are off after deleting an item, what do you mean? I don't think that MultiPage deletes an unused static page (if you start with 5 items and delete 1, than rebuild, you will still have a profile-5.html file). Also, you the headlines profile and the MultiPage profile both must be rebuilt to keep them in sync. Coranto SHOULD do this automatically since the item you deleted or changed will be included in both profiles.

Even if you have Auto Build ON, I don't think Coranto builds your files if all you do is delete an item. After deleting I think you have to build the files manually. (not sure since I don't use Auto Build)

Do you get the same results with a FULL rebuild?

Do you have Auto Build on or off?

What version of Perl is your server using?
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

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

Actually I consider this to be a "bug" in Multipage, so try modifing Multipage like this. In cra_multipage.pl find the line:
Code: Select all
my $DoMultiPage = <<'END CODE';

Change it to:
Code: Select all
sub DoMultiPage {

At the end of that "sub", find the line:
Code: Select all
END CODE

Change it to:
Code: Select all
}

Find the line:
Code: Select all
$addon->hook(BuildNews_Filtered,\$DoMultiPage);

Change it to:
Code: Select all
$addon->hook(BuildNews_Filtered,'DoMultiPage');

Then the example I gave you at the first place should work...
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:50 pm

Okay I made changes to the multipage file, then used the following as my styles for EACH style I have:

Code: Select all
<PerlCode>
  if (not $schoolcount{$ProfileName}) {
         $schoolcount{$ProfileName}= 1
         } else {
        ++$schoolcount{$ProfileName}
         }
</PerlCode>


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


And.. it's not even changing the numbers now for whatever-?.. it stays as 1.
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

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

Dale yes I do have auto build on. I am not sure what type of perl my server has...
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Thu Apr 08, 2004 7:06 pm

adnan wrote:Okay I made changes to the multipage file, then used the following as my styles for EACH style I have:

Code: Select all
<PerlCode>
  if (not $schoolcount{$ProfileName}) {
         $schoolcount{$ProfileName}= 1
         } else {
        ++$schoolcount{$ProfileName}
         }
</PerlCode>


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


And.. it's not even changing the numbers now for whatever-?.. it stays as 1.
Well, that is not so strange, since there is a typo... ;-) You can´t use just schoolcount as a counter, since it is now a scalar. Try using unique counter names as Dale and I suggested instead, I provided an example...
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 7:26 pm

oh oops.. lol.. i used this one below and changed the number in each different style and it still didn't seem to work.

Code: Select all
<PerlCode>
  $NewsCounter1 = ++$countitems;
</PerlCode>


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

Postby Parahead » Thu Apr 08, 2004 7:46 pm

adnan wrote:oh oops.. lol.. i used this one below and changed the number in each different style and it still didn't seem to work.

Code: Select all
<PerlCode>
  $NewsCounter1 = ++$countitems;
</PerlCode>


<font size="2" face="arial"><b><a href="/read/00005-<Field: NewsCounter1>.shtml"><Field: Subject></a></b><BR>
No, no, no... This has the same problem... ;-) Use the example I provide *exactly* as I provided it...
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 Apr 09, 2004 1:16 am

Ahh which example, i am so stupid, which example? Do you think you could post it again just so I know I'm doing the right one? :lol:
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby adnan » Fri Apr 09, 2004 1:24 am

OMG!! OMG!!! YOU DID IT!! IT'S FIXED!! IT WORKS FINE NOW! EACH SECTION IS WORKING PERFECTLY NOW! I EVEN DELETED A NEWS ITEM AND NOTHING WAS CHANGED! I CANNOT THANK YOU ENOUGH! THANK YOU SO MUCH... WHEN MY SITE OPENS I WILL DEFINITELY COME BACK HERE AND POST HERE AND THEN YOU GUYS CAN GO FIND IN WHAT 3 PLACES I USED THIS.

Well I could give you guys the URL in the meantime. It's an entertainment website that's been around for 2 years. My name is Adnan and I am 15 years old. The message boards are still open right now, and the main site will finally re-open sometime this month, but very soon. Here is ECFAN.

http://www.ecfan.com

Once again thank you to every single person that helped with this especially Parahead. Seriously though thank you so much. This is one big burden lifted off of me. THANK YOU THANK YOU THANK YOU!! :) :) :)
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby adnan » Fri Apr 09, 2004 4:53 am

hey parahead, i also have one small problem, it seems kinda simple, if you could help me that would be great, it's here. i hope i posted in the right forum :lol:

http://coranto.org/forum/viewtopic.php?p=47380#47380
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Fri Apr 09, 2004 6:39 am

adnan wrote:Once again thank you to every single person that helped with this especially Parahead. Seriously though thank you so much. This is one big burden lifted off of me. THANK YOU THANK YOU THANK YOU!! :) :) :)
Great you got it working in the end... :-) Still, I consider this to be a bug in Multipage and the solution I provided to modify the addon really should be executed instead, since the PerlCode example with different counternames for each style is more of a workaround then the optimal solution... I´ll contact Sumaleth and see what he thinks, maybe it can be incorporated into a new release...
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 » Sat Apr 10, 2004 12:09 am

Actually Parahead, I had to replace the new multipage file with the old one because whatever you wanted me to change stopped updating the single paged files. So no changes would be made to the multipage files when I made them. So I changed back.

The new code you had put up, I didn't see a difference the first time except there being diferent numbers, so that's probably why it wasn't working. Blind Adnan couldn't see... lol. thanks again! :)
adnan
 
Posts: 88
Joined: Wed Apr 07, 2004 1:41 am

Postby Parahead » Sat Apr 10, 2004 7:55 am

adnan wrote:Actually Parahead, I had to replace the new multipage file with the old one because whatever you wanted me to change stopped updating the single paged files. So no changes would be made to the multipage files when I made them. So I changed back.
OK, at least you got it working now and we know how to solve this in the future then... Havn´t seen Sumaleth around lately but maybe he could look into the changes of Multipage...
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

Previous

Return to Addon Development and Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron