• In MT, people set up a hack where you can have a link for MORE and when you click on it, it will open on the same page (just below) and when you’ve finished reading, at the bottom there’s another link that can say FINISHED READING and click on it and it will hide that more text.
    I’ve shown the code below that they are using for MT – is there a way for us to use this in the WordPress template, and, if so, how? What would we do?
    This is the code they say to put at the top of your page, javascript, to use to do that:
    function showMore(varA1, varB1){
    var123 = (‘varXYZ’ + (varA1));
    varABC = (‘varP’ + (varA1));
    if( document.getElementById ) {
    if( document.getElementById(var123).style.display ) {
    if( varB1 != 0 ) {
    document.getElementById(var123).style.display = “block”;
    document.getElementById(varABC).style.display = “none”;
    } else { document.getElementById(var123).style.display = “none”;
    document.getElementById(varABC).style.display = “block”; }
    } else { location.href = varB1;
    return true; }
    } else { location.href = varB1;
    return true; }
    }
    function showMoreComments(varA12, varB12){
    var1232 = (‘varXYZ2’ + (varA12));
    varABC2 = (‘varP2’ + (varA12));
    if( document.getElementById ) {
    if( document.getElementById(var1232).style.display ) {
    if( varB12 != 0 ) {
    document.getElementById(var1232).style.display = “block”;
    document.getElementById(varABC2).style.display = “none”;
    } else { document.getElementById(var1232).style.display = “none”;
    document.getElementById(varABC2).style.display = “block”; }
    } else { location.href = varB12;
    return true; }
    } else { location.href = varB12;
    return true; }
    }
    However, they then say to add this to your MT template:
    This code is placed where you want the expandable link for your extended text to appear:
    <MTEntryIfExtended>
    <span id=”varP<MTEntryID>”>#<MTEntryID pad=”1″>” onclick=”showMore(<MTEntryID>,'<MTEntryLink>#<MTEntryID pad=”1″>’);return false;”>read more ?
    </span><div id=”varXYZ<MTEntryID>” style=”display: none”><MTEntryMore>” onclick=”showMore(<MTEntryID>,0);return true;”>? hide more</div>
    </MTEntryIfExtended>
    And this code is placed where you want the expandable link for your comments to appear:
    <MTEntryIfAllowComments>
    <span id=”varP2<MTEntryID>” class=”extended”>#<MTEntryID pad=”1″>” onclick=”showMoreComments(<MTEntryID>,'<MTEntryLink>#<MTEntryID pad=”1″>’);return false;”>show comments right here ?
    </span><div id=”varXYZ2<MTEntryID>” style=”display: none”> <MTComments> <MTCommentBody> Posted by <MTCommentAuthorLink> at <MTCommentDate>
    </MTComments> ” onclick=”showMoreComments(<MTEntryID>,0);return true;”>? hide comments</div>
    </MTEntryIfAllowComments>
    Thanks very much for your help.

Viewing 16 replies (of 16 total)
Viewing 16 replies (of 16 total)
  • The topic ‘More opening in same page – extended’ is closed to new replies.