Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Disable print story in Sections ??
  • Posted: 26.07.2003, 09:57
     
    webdaddy
    rank:
    Freshman Freshman
    registered:
     April 2003
    Status:
    offline
    last visit:
    17.12.04
    Posts:
    20
    How can you disable the link to 'Print Story' at the very top of each item you add under the Sections Module?

    Thanks
  • Posted: 09.08.2003, 08:05
     
    austinstace
    rank:
    Freshman Freshman
    registered:
     March 2003
    Status:
    offline
    last visit:
    16.10.04
    Posts:
    45
    Around line 247 of index.php in modules/sections/ you will find the lines that put the number of reads, print, etc at the top of the article. Use two forward slashes "//" at the beginning of the line to comment out the line so that it will not be read when the page is served.
  • Posted: 19.08.2003, 01:13
     
    virile
    rank:
    Softmore Softmore
    registered:
     June 2003
    Status:
    offline
    last visit:
    01.12.04
    Posts:
    73
    sweet,, thats what I was looking for ty !
    Lines 239-250 are like this:

    $arrayelement = (int)$page;
    $arrayelement --;
    echo "<font class="\"pn-title\"">".pnVarPrepForDisplay($title)."

    ";
    if ($pageno > 1) {
    echo "<font class="\"pn-normal\"">"._PAGE.": ".pnVarPrepForDisplay($page)."/".pnVarPrepForDisplay($pageno)."
    ";
    }
    echo "<font class="\"pn-normal\"">(".pnVarPrepForDisplay($words)." "._TOTALWORDS.")
    "
    ."<font class="\"pn-normal\"">(".pnVarPrepForDisplay($counter)." "._READS.")   "
    ."\""._PRINTER."\""
    ."

    ";
    echo "<font class="\"pn-normal\"">".pnVarPrepHTMLDisplay($contentpages[$arrayelement])."";
    if($page >= $pageno) {

    -----------------------------------------------------------------------

    so it would be like this ?

    echo "<font class="\"pn-normal\"">(".pnVarPrepForDisplay($words)." "._TOTALWORDS.")
    "
    ."<font class="\"pn-normal\"">(".pnVarPrepForDisplay($counter)." "._READS.")   "
    ."\""._PRINTER."\""
    ."

    ";
    echo "<font class="\"pn-normal\"">".pnVarPrepHTMLDisplay($contentpages[$arrayelement])."";

    --------------------

    I am still not sure where to put those 2 "//" ?

    --
    Sharp! Like you pulled me out the pencil sharpener ...
    Bad! Like that student in the principal's office ...
  • Posted: 28.08.2003, 09:20
     
    virile
    rank:
    Softmore Softmore
    registered:
     June 2003
    Status:
    offline
    last visit:
    01.12.04
    Posts:
    73
    Well I am back at it on a 2day off period from work and I was wondering if someone could possibly take their time to show me again the 2 lines // I need to put in my special sections page to get rid of the print and # of words per paragraph that austinstace has spoke about. I tried before with the information I searched for and found here but I ended up having to use the Swiss.A.T. to reset everything. I am not sure what I am doing wrong.

    Lines 240-250 I am confused as where to post them, in front of ._READS I put //, or in front of ._TOTALWORDS I put // ?

    echo "<font class="\"pn-normal\"">(".pnVarPrepForDisplay($words)." "._TOTALWORDS.")
    "
    ."<font class="\"pn-normal\"">(".pnVarPrepForDisplay($counter)." "._READS.")   "
    ."\""._PRINTER."\""
    ."

    ";
    echo "<font class="\"pn-normal\"">".pnVarPrepHTMLDisplay($contentpages[$arrayelement])."";

    --
    Sharp! Like you pulled me out the pencil sharpener ...
    Bad! Like that student in the principal's office ...
  • Posted: 29.08.2003, 05:41
     
    virile
    rank:
    Softmore Softmore
    registered:
     June 2003
    Status:
    offline
    last visit:
    01.12.04
    Posts:
    73
    Not tryin to be a pain but I tried it on my own again and I get database connection error and had to use the s.a.t. to fix it. Anyone ?

    --
    Sharp! Like you pulled me out the pencil sharpener ...
    Bad! Like that student in the principal's office ...
  • Posted: 31.08.2003, 07:00
     
    eMark
    rank:
    Freshman Freshman
    registered:
     August 2003
    Status:
    offline
    last visit:
    03.09.03
    Posts:
    9
    You would just comment out the whole line for the Print Link as follows.

    echo "<font class="\"pn-normal\"">(".pnVarPrepForDisplay($words)." "._TOTALWORDS.")
    "
    ."<font class="\"pn-normal\"">(".pnVarPrepForDisplay($counter)." "._READS.")   "

    //."\""._PRINTER."\""

    ."

    ";
    echo "<font class="\"pn-normal\"">".pnVarPrepHTMLDisplay($contentpages[$arrayelement])."";

    --
    eMarkHosting.com
    Fast Reliable Web Hosting starting at just $4.00 per month.
    Easy-Install PostNuke included with all Web Hosting Accounts.
  • Posted: 01.09.2003, 02:56
     
    virile
    rank:
    Softmore Softmore
    registered:
     June 2003
    Status:
    offline
    last visit:
    01.12.04
    Posts:
    73
    Thanks for responding. The 2 // I put exactly where you mentioned and when I checked the sections page all that shows now is the printer Icons.

    --
    Sharp! Like you pulled me out the pencil sharpener ...
    Bad! Like that student in the principal's office ...
  • Posted: 01.09.2003, 03:06
     
    virile
    rank:
    Softmore Softmore
    registered:
     June 2003
    Status:
    offline
    last visit:
    01.12.04
    Posts:
    73
    I am not sure why but even when I look up in Edit/Find the line that is specified to disable printers Icon and I added those forward slashes it still shows the icons. Is there another line I have to add to or take out ?

    echo "<font class="\"pn-normal\"">(".pnVarPrepForDisplay($words)." "._TOTALWORDS.")
    "
    ."<font class="\"pn-normal\"">(".pnVarPrepForDisplay($counter)." "._READS.")   "
    //."\""._PRINTER."\""
    ."

    ";
    echo "<font class="\"pn-normal\"">".pnVarPrepHTMLDisplay($contentpages[$arrayelement])."";
    if($page >= $pageno) {
    $next_page = "";
    } else {



    here is the link: http://www.nexusn2v.com/nexus/726/modules.php?op=modload&name=Sections&file=index&req=listarticles&secid=4

    --
    Sharp! Like you pulled me out the pencil sharpener ...
    Bad! Like that student in the principal's office ...
  • Posted: 01.09.2003, 04:17
     
    eMark
    rank:
    Freshman Freshman
    registered:
     August 2003
    Status:
    offline
    last visit:
    03.09.03
    Posts:
    9
    Based on the link you provided, in the index.php file for the "Section" module look for the following lines under "function listarticles()" and comment out as below.

    $result->MoveNext();
    if (pnSecAuthAction(0, 'Sections::Article', "$title:$secname:$artid", ACCESS_READ)) {
    echo ""
    ."<big>·</big> "
    ."".pnVarPrepForDisplay($title)." (".pnVarPrepForDisplay($counter)." "._READS.")"
    //." \""._PRINTER."\""
    ."";
    }

    --
    eMarkHosting.com
    Fast Reliable Web Hosting starting at just $4.00 per month.
    Easy-Install PostNuke included with all Web Hosting Accounts.
  • Posted: 01.09.2003, 05:06
     
    virile
    rank:
    Softmore Softmore
    registered:
     June 2003
    Status:
    offline
    last visit:
    01.12.04
    Posts:
    73
    That worked perfect and the page actually loaded 1.3 seconds faster. I tried to practice this on a seperate page and then tried to put it inplace of the original /sections/inex.php but it never went as planned resulting in swiss army to help me out. Thank You very much, I already added your name on my credits list.

    My last question would be to disable the reads number beside that using the same link I provided above. I did exactly as what you pasted for the icon, now would I go ahead and put back the 2 // infront of .""
    ."<big>·</big> "
    ."
    ".pnVarPrepForDisplay($title)." (".pnVarPrepForDisplay($counter)." "._READS.")"
    // ." \""._PRINTER."\""
    ."";

    --
    Sharp! Like you pulled me out the pencil sharpener ...
    Bad! Like that student in the principal's office ...
  • Posted: 01.09.2003, 05:26
     
    eMark
    rank:
    Freshman Freshman
    registered:
     August 2003
    Status:
    offline
    last visit:
    03.09.03
    Posts:
    9
    For that you would need 2 sets of comment tags for the "reads" part of the script as follows because you need the trailing ".

    echo ""
    ."<big>·</big> "
    ."".pnVarPrepForDisplay($title)."//(".pnVarPrepForDisplay($counter)." "._READS.")//"
    //." \""._PRINTER."\""
    ."";

    --
    eMarkHosting.com
    Fast Reliable Web Hosting starting at just $4.00 per month.
    Easy-Install PostNuke included with all Web Hosting Accounts.
  • Posted: 01.09.2003, 05:55
     
    virile
    rank:
    Softmore Softmore
    registered:
     June 2003
    Status:
    offline
    last visit:
    01.12.04
    Posts:
    73
    Ok thanks again, I am grateful for YOUR TIME ! :) . Now I added the // where you said to and obviously you know I am still learning this. As I refreshed the page after my adjustment this is what I got:

    http://www.nexusn2v.com/nexus/726/modules.php?op=modload&name=Sections&file=index&req=listarticles&secid=4

    --
    Sharp! Like you pulled me out the pencil sharpener ...
    Bad! Like that student in the principal's office ...
  • Posted: 01.09.2003, 07:35
     
    eMark
    rank:
    Freshman Freshman
    registered:
     August 2003
    Status:
    offline
    last visit:
    03.09.03
    Posts:
    9
    Sorry....I gave you bad info. Replace this part of your code with the following:

    echo ""
    ."<big>·</big> "
    ."".pnVarPrepForDisplay($title).""
    //."(".pnVarPrepForDisplay($counter)." "._READS.")"
    //." \""._PRINTER."\""
    ."";

    --
    eMarkHosting.com
    Fast Reliable Web Hosting starting at just $4.00 per month.
    Easy-Install PostNuke included with all Web Hosting Accounts.
  • Posted: 01.09.2003, 09:38
     
    virile
    rank:
    Softmore Softmore
    registered:
     June 2003
    Status:
    offline
    last visit:
    01.12.04
    Posts:
    73
    :) That worked good! Thank You. Some may say there is no difference but that knocked off another .7 seconds of a page load. Now I tried the 2 // in front of this like you said the first time:

    }
    echo "<font class="\"pn-normal\"">(".pnVarPrepForDisplay($words)." "._TOTALWORDS.")
    "
    //."<font class="\"pn-normal\"">(".pnVarPrepForDisplay($counter)." "._READS.")   "
    //."\""._PRINTER."\""
    ."

    ";
    echo "<font class="\"pn-normal\"">".pnVarPrepHTMLDisplay($contentpages[$arrayelement])."";
    if($page >= $pageno) {
    $next_page = "";
    }

    So on the main sections selection its just the links. Now when I click a link with that code above being in the PHP document I disabled the printer and page hits. Now do I add the same // in front of the:

    }
    echo //"<font class="\"pn-normal\"">(".pnVarPrepForDisplay

    to disable the amount words to show ? I am not sure because would those 2 // rule out the echo ?

    http://www.nexusn2v.com/nexus/726/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=9&page=1

    --
    Sharp! Like you pulled me out the pencil sharpener ...
    Bad! Like that student in the principal's office ...

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula