DiscusWare, LLC.
Download Purchase Contact Us
Home
Support Home Documentation Knowledge Base Support Forums Support Request Advanced Services
topics.gif Topics tree.gif Tree View mods.gif Moderators magglass.gif Search   help.gif Help
mods.gif Register gears.gif Edit Profile members.gif Member List hot.gif New Posts: 1 | 3 | 7 days  

Archive through July 31, 2003

DiscusWare Support Forum * Product feedback and suggestions * Program Feature Wish List * User Interface * Archive as pages in form of page 1, page 2 etc. * Archive through July 31, 2003 < Previous Next >

Author Message
Top of pagePrevious messageNext messageBottom of page

Dirk Seffern
Senior Member
Username: Seffern

Post Number: 187
Registered: 05-2002

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, April 25, 2003 - 04:32 am:   Edit Post Print Post

Discus 4.04 pro

Hi,

I am looking for an alternative layout for the functionality of the archives. In many discussion forums is the way of showing it as pages like in a book. So you start reading actually with an archive, which is called page 1. The next archive is then page 2 etc. and the most current comments are on the last page.

So the reader/user does not have the feeling to read in an old, outdated archive, although it is one.

But for this a different layout-option seems to be necessary. Since the page numbers have to be at the lower right hand buttom like in a book.

Is there a possibility to do that in a future release and if yes, is it then possible also to convert old archives into this "page number-Look"?

Is it maybe something which can be made manually easily in a hack/modification?

Thanks

Dirk
Top of pagePrevious messageNext messageBottom of page

Kevin W. Paulisse
Moderator
Username: Paulisse

Post Number: 11099
Registered: 11-1999

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, April 25, 2003 - 07:38 am:   Edit Post Print Post

Such a modification has been tested by us, but is not currently documented or supported because it involves interacting directly with the perl in cached template files. We are looking to implement something such as this in future versions, leveraging PHP to break up the pages while retaining the same benefits of static pages. I will post our proof-of-concept modification here. Please realize that this comes with NO SUPPORT, however, and I have the right not to answer any questions about it until it is supported. That said:

1. You must use .php as the extension for your message pages and have PHP on your server (or you must use an extension that's parsed by PHP).

2. You must be using the Discus template cache option.

In the subtopics section of the page part, you will need to insert the following code (note that <#foreach $subtopic (@subtopics)#> is already there, so that's a point of reference as to where this goes):

 
<#define $count = "0"#>
<#define $page = "0"#>
<#define $flag = "0"#>
<#foreach $subtopic (@subtopics)#>
<#math: $count += 1#>
<#if [ $count % 50 ] == 1 #>
<#if $flag == 1#>
<? } ?>
<#endif#>
<#perl#>
$TEXT2 .= "<?php if ( \$HTTP_GET_VARS[\"page\"] == $substitutions->{_}->{page} ) { ?>\n";
<#/perl#>
<#define $flag = "1"#>
<#math: $page += 1#>
<#endif#>
<#if $subtopic->{type} == 0#>


Here are a few notes about this:

1. You're controlling how many threads are listed on a page by the 50 in $count % 50. That should be pretty clear, hopefully.

2. The $TEXT2 may be different on your implementation. For this you will have to look at the cached template file (SKIN_###_page.pl under [admin_dir]/data/tcache). Look at the name of the perl variable that's being built up at the time and adjust accordingly. Note also that if you change something about your skin, you may need to change this variable name too.

3. <#if $subtopic->{type} == 0#> is already in the skin, and I'm providing that as an additional point of reference.

I hope that this is helpful to someone, and we will be making this sort of thing easier in the future by not requiring the use of <#perl#> to make this work.
Top of pagePrevious messageNext messageBottom of page

Kevin W. Paulisse
Moderator
Username: Paulisse

Post Number: 11108
Registered: 11-1999

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, April 25, 2003 - 07:43 am:   Edit Post Print Post

Here's the other half of the needed code:

 
<#endloop#>
<#if $flag == 1#>
<? } ?>
<#endif#>
<#if $page > 0#>
<tr bgcolor=$color->{alt_1}>
<td><font size=1>&nbsp;</font></td>
<td><font size=1 face="$color->{face}" color="$color->{alt_2}">
Page: <b>
<#for $i = 1 to $page step 1#>
<#mathdefine: $j = diff($i, 1)#>
<a href="$head->{me_number}.$ext?page=$j"><font color="$color->{alt_2}">$i</font></a>
<#endfor#>
</b></font></td>
<td><font size=1 face="$color->{face}" color="$color->{alt_2}">&nbsp;</font></td>
<td><font size=1 face="$color->{face}" color="$color->{alt_2}">&nbsp;</font></td>
<td><font size=1 face="$color->{face}" color="$color->{alt_2}">&nbsp;</font></td>
<td><font size=1 face="$color->{face}" color="$color->{alt_2}">&nbsp;</font></td>
</tr>
<#endif#>


Nothing too special here in terms of trickery. The <#endloop#> is already there at the bottom of the subtopic list. You may choose to put the table row with the pages immediately after it, as shown in my example code, or you might want to put it below the already-defined table row for the bottom of the list, depending on your tastes.
Top of pagePrevious messageNext messageBottom of page

EJ Bogusch
Advanced Member
Username: Ejbogusch

Post Number: 80
Registered: 01-2003

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 14, 2003 - 09:11 pm:   Edit Post Print Post

Dirk have you given this a try and if yes, how is it working for you.
Top of pagePrevious messageNext messageBottom of page

Mark Lane
Intermediate Member
Username: Martinl

Post Number: 43
Registered: 12-2002

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 14, 2003 - 10:53 pm:   Edit Post Print Post

Interesting and reassuring you guys are working on this Kevin. I'm auto-archiving, but actively rename the pages Page one, Page Two, etc presently.

Given the caveats mentioned, would you speculate if implemented as above, would the final supported version 'handle' the archives created by the above?

Or would expansion of the archives be needed to implement the anticipated supported version that incorporates this feature?

Any clue when this version, which would make auto-archive completely "AUTO"(in my opinion) and more user-friendly, will be available?

Inquiring minds want to know...

As always, great features, superb support.
Top of pagePrevious messageNext messageBottom of page

Kevin W. Paulisse
Moderator
Username: Paulisse

Post Number: 11296
Registered: 11-1999

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 15, 2003 - 07:17 am:   Edit Post Print Post

The skin/PHP system essentially dynamically generates the list of threads each time it's hit, and applying this against any existing page would cause that page's threads to be split into multiple parts. Un-applying that skin would return the display to one big, long list. This method does not touch the way that threads are stored on the page, just how they're rendered.

Actively renaming the threads, or using the Discus automatic archiving features, alters the structure of the board, and these changes will be consistent across any skin. If you in the future deployed the skin/PHP paging system your "Page 1" and "Page 2" might fall on some page other than page 1 according to the skin/PHP system.

My recommendation is that if someone really, really wants their board to have Page 1 ... 2 ... 3 ... etc. that they can look into this skin customization. Much more effective, in my opinion, is the automatic archiving of threads provided by Archive Manager, as it makes the physical page smaller and shuts off outdated discussion rather than allowing an old thread to become re-active with new (or unrelated) discussion.
Top of pagePrevious messageNext messageBottom of page

Dirk Seffern
Senior Member
Username: Seffern

Post Number: 196
Registered: 05-2002

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 21, 2003 - 03:25 pm:   Edit Post Print Post

Hi EJ,

I did not give this site-paging-archive yet a try. The problem is that I have really not a lot of knowledge in programming, so this would be very risky for me.

But I am sure that I will try it over the next months on a testboard as soon as I have more time for this.

To Kevin:

In my case users discus ongoing about a subject and new visitors normally prefer to read the whole thread from the beginning like with a book.

To Mark:

" ...but actively rename the pages Page one, Page Two, etc presently"

How do you do this?

Dirk

Top of pagePrevious messageNext messageBottom of page

Mark Lane
Intermediate Member
Username: Martinl

Post Number: 44
Registered: 12-2002

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 21, 2003 - 05:19 pm:   Edit Post Print Post

though Archive Manager, I just rename the pages.
Top of pagePrevious messageNext messageBottom of page

Bradley G
Unregistered guest

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, July 31, 2003 - 03:11 am:   Edit Post Print Post

Kevin

Could you possibly clarify which pages you refer to when you talk about the "...must use .php as the extension for your message pages and have PHP on your server (or you must use an extension that's parsed by PHP). "?

I'd like to try this but just want to be sure of the pages I'm modifying.

Cheers
Bradley G

Top of pagePrevious messageNext messageBottom of page

Bradley G
Unregistered guest

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, July 31, 2003 - 03:13 am:   Edit Post Print Post

Oh and does it need to be Pro version for this to work?
Download Purchase Contact Us
Feedback  |  Privacy Policy
Copyright © 2005, DiscusWare, LLC, All Rights Reserved