Please disregard the 'View article...' shown at the bottom of many posts as this is the result of restoring old forum posts from a backup.

"Above/Below the fold" for news posts

What version of Exponent are you using? (v2.2.2 is the most recent)

You may insert a 'break' (shift-enter) into the text which will be included in the first para/div.

The 3 display options are full (the entire article), none (no article), and summary (which uses the smarty 'summarize' function/plugin). The function/plugin simply looks for the first para/break to split out the summary text.

Through v2.2.1 we simply did a 'text' summary to the first para/div and include the links. Then for v2.2.2+ we switched to a html summary so the images and formatting within that first section would be displayed.

Statistics: Posted by dleffler

Comments

  • I'm running 2.2.2. I think my problem is that the WYSIWYG editor tends to put most things into < p >'s (including IMGs) and the 'summarize' fn is kind of simplistic in how it returns the 1st p/div. Ideally I'd like to insert a manual break into a post (the simplest option would be a page break, since the editor already supports this) and have the summary view split on that.

    As it stands now, the best option I've found is to replace any < p >'s with a single paragraph with < BR />'s to separate them.

    Not ideal, but the alternative seems to be to hack summarize()...

    Statistics: Posted by kmitchell
  • FWIW, the editor page break simply inserts a

    Code:
     


    which is a printer page break.

    You can create your own custom 'summarize' modifier by copying the /framework/plugins/modifier.summarize.php file into /themes/yourtheme/plugins/modifier.summarize.php

    SO....if you add another switch/case element (like 'parapage') looking which breaks at any match to the above, you'd probably have your fix. In fact, that might not be a bad addition, but will require some bug chasing to see if it always is placed on it's own and not between div's.

    Statistics: Posted by dleffler
  • This is an EXCELLENT idea, and is now included in the pre-release code for v2.2.3!

    My suggestion to create a custom plugin will NOT work since we've moved the 'summarize' method to the expString subsystem and you cannot create a theme custom subsystem.

    Statistics: Posted by dleffler
  • This is an EXCELLENT idea, and is now included in the pre-release code for v2.2.3!

    My suggestion to create a custom plugin will NOT work since we've moved the 'summarize' method to the expString subsystem and you cannot create a theme custom subsystem.

    Statistics: Posted by dleffler
  • FWIW, the editor page break simply inserts a

    Code:
     


    which is a printer page break.

    You can create your own custom 'summarize' modifier by copying the /framework/plugins/modifier.summarize.php file into /themes/yourtheme/plugins/modifier.summarize.php

    SO....if you add another switch/case element (like 'parapage') looking which breaks at any match to the above, you'd probably have your fix. In fact, that might not be a bad addition, but will require some bug chasing to see if it always is placed on it's own and not between div's.

    Statistics: Posted by dleffler
  • I'm running 2.2.2. I think my problem is that the WYSIWYG editor tends to put most things into < p >'s (including IMGs) and the 'summarize' fn is kind of simplistic in how it returns the 1st p/div. Ideally I'd like to insert a manual break into a post (the simplest option would be a page break, since the editor already supports this) and have the summary view split on that.

    As it stands now, the best option I've found is to replace any < p >'s with a single paragraph with < BR />'s to separate them.

    Not ideal, but the alternative seems to be to hack summarize()...

    Statistics: Posted by kmitchell
  • What version of Exponent are you using? (v2.2.2 is the most recent)

    You may insert a 'break' (shift-enter) into the text which will be included in the first para/div.

    The 3 display options are full (the entire article), none (no article), and summary (which uses the smarty 'summarize' function/plugin). The function/plugin simply looks for the first para/break to split out the summary text.

    Through v2.2.1 we simply did a 'text' summary to the first para/div and include the links. Then for v2.2.2+ we switched to a html summary so the images and formatting within that first section would be displayed.

    Statistics: Posted by dleffler
  • Just looking at 2.3.0 Looks really nice and the "parapaged" feature is exactly what I was hoping for. I think there's a small bug tho...

    In framework/core/subsystems/expString.php:293 the split is on:

    div style="page-break-after: always;" span style="display: none;" /span /div

    but the WYSIWYG editor produces the following:

    div style="page-break-after: always" span style="display: none;" /span /div

    (no semicolon after 'always')

    so the match fails.


    View article...
  • Thanks! Looks like CKEditor changed the string they insert. I'll try to change the code to handle both options and have it in 2.3.0patch2 due out this Friday.


    View article...
Sign In or Register to comment.