1
jtaylor
News Module Hack for Numbering text lines
  • 2005/8/4 0:48

  • jtaylor

  • Just popping in

  • Posts: 51

  • Since: 2004/11/12


Hack for News Module

Would it be easy to do a hack to allow each line in a news story or other news module display to be numbered. See example below.

jkadjaslkjfdlfjlfjsafdjasfjlfjdlkl------1
jaljfdlajfdsjfaldfjasljfalsjflkjfl------2
ajfdfiuijadfjklajfldasfj----------------3

ect...without the dashes though

If anyone has an idea how do to this let me know.


James

2
hervet
Re: News Module Hack for Numbering text lines
  • 2005/8/5 14:46

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hello,

Here is a quick and dirty solution.

Edit the template called news_item.html and find the line wich begins with :
Quote:

<{$story.imglink}>




replace it with :
Quote:

<{$story.imglink}>

    <{$story.text}>




Then edit the file called /xoops/modules/news/article.php
Just before this line :
Quote:

function my_highlighter ($matches) {


insert :
Quote:

$story['text'] = str_replace('
','
  • ',$story['text']);


  • In your stylesheets (style.css, styleNN.css and styleMac.css) verify that the following definition :
    Quote:

    li { margin-left: ...


    does not contains :
    Quote:

    list-style: square inside


    Update the module before to see.

    As I said, it's a really dirty hack because the html
  • tags are not closed.

    I've made some tests with this :
    http://www.w3.org/TR/REC-CSS2/generate.html#counters

    But it does not seems to run with all browsers.

    Bye,
    Hervé

  • Login

    Who's Online

    293 user(s) are online (212 user(s) are browsing Support Forums)


    Members: 0


    Guests: 293


    more...

    Donat-O-Meter

    Stats
    Goal: $100.00
    Due Date: Nov 30
    Gross Amount: $0.00
    Net Balance: $0.00
    Left to go: $100.00
    Make donations with PayPal!

    Latest GitHub Commits