Forum Replies Created

Viewing 15 replies - 106 through 120 (of 121 total)
  • Forum: Plugins
    In reply to: Collapsible text block

    i was thinking for a plugin like that and i may try it

    for now i would suggest to take a look at my collapsible elements page and read…

    From the IP of your db server i assume that both web and db server are in the same LAN. Also assuming that your wp-config.php file is correct, there maybe a firewall that may drop external connections on your database server (from your web server). I would check the logs of your db server to see if there have been requests from your webserver.

    well there s a lot talking about this and people are a bit confused. You can integrade almost anything to wordpress sometimes easier, sometimes the hard way. IMHO the best layout integration can be achieved with miniBB which is ultra fast and minimalistic. Check my blog and forums. On the other hand it needs some work to integrade it having the same users with wordpress if that’s what you want, something that bbpress can offer easily with a plugin.

    The point is that there’s no ideal solution, try this or that and keep the one which suits you more.

    following this tip find comments.php in your theme and

    replace this:
    <?php foreach ($comments as $comment) : ?>

    with that:
    <?php foreach (array_reverse($comments) as $comment) : ?>

    then whatever order you have will be reversed.

    Forum: Plugins
    In reply to: Shortening long comments.

    I had a similar problem with really long comments in some of my posts and that’s why i made Collapsible Comments plugin. It shows the excerpt of each comment which now are collapsible and you can open each one by demand.

    But it doesn’t “shorten” them, it just loads them all and hides them till you click each one you want to open it.

    Well i didnt clearly understand what’s your problem but an easy way to have white “blocks” of comments is to find the file “comments.php” and make a table there putting in it’s cell whatever you want having a white background (or anything). If, for example, put only the raw <php comment_text()> then you will have many blocks of each comment, etc.

    One other thing is that Inline JS is useful when you need a piece of code once in your post. But if you want to use the same code anywhere else in your template you ‘d better put it in the header and call it when you need it.

    More info here.

    If it is an effect you would like to use for just one post you could easily use a plugin like INLINE JS or similar so you could add inline javascript code to your post.

    To embed a media player i have used this piece of code which works with all browsers:

    <object ID="MediaPlayer" width="170" height="70"
    CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    standby="Loading Windows Media Player components..."
    type="application/x-oleobject">
    <PARAM NAME="FileName" VALUE="https://streamURI:port/" valuetype="ref" ref>
    <param name="AudioStream" value="1">
    <param name="AutoSize" value="0">
    <param name="AutoStart" value="0">
    <param name="AnimationAtStart" value="0">
    <param name="AllowScan" value="-1">
    <param name="AllowChangeDisplaySize" value="-1">
    <param name="AutoRewind" value="0">
    <param name="Balance" value="0">
    <param name="BaseURL" value>
    <param name="BufferingTime" value="5">
    <param name="CaptioningID" value>
    <param name="ClickToPlay" value="-1">
    <param name="CursorType" value="0">
    <param name="CurrentPosition" value="-1">
    <param name="CurrentMarker" value="0">
    <param name="DefaultFrame" value>
    <param name="DisplayBackColor" value="0">
    <param name="DisplayForeColor" value="16777215">
    <param name="DisplayMode" value="1">
    <param name="DisplaySize" value="1">
    <param name="Enabled" value="-1">
    <param name="EnableContextMenu" value="-1">
    <param name="EnablePositionControls" value="-1">
    <param name="EnableFullScreenControls" value="-1">
    <param name="EnableTracker" value="-1">
    <param name="InvokeURLs" value="-1">
    <param name="Language" value="-1">
    <param name="Mute" value="0">
    <param name="PlayCount" value="0">
    <param name="PreviewMode" value="0">
    <param name="Rate" value="1">
    <param name="SAMILang" value>
    <param name="SAMIStyle" value>
    <param name="SAMIFileName" value>
    <param name="SelectionStart" value="-1">
    <param name="SelectionEnd" value="-1">
    <param name="SendOpenStateChangeEvents" value="-1">
    <param name="SendWarningEvents" value="-1">
    <param name="SendErrorEvents" value="-1">
    <param name="SendKeyboardEvents" value="0">
    <param name="SendMouseClickEvents" value="0">
    <param name="SendMouseMoveEvents" value="0">
    <param name="SendPlayStateChangeEvents" value="-1">
    <param name="ShowCaptioning" value="0">
    <param name="ShowControls" value="-1">
    <param name="ShowAudioControls" value="-1">
    <param name="ShowDisplay" value="0">
    <param name="ShowGotoBar" value="0">
    <param name="ShowPositionControls" value="0">
    <param name="ShowStatusBar" value="-1">
    <param name="ShowTracker" value="-1">
    <param name="TransparentAtStart" value="0">
    <param name="VideoBorderWidth" value="0">
    <param name="VideoBorderColor" value="616614">
    <param name="VideoBorder3D" value="-1">
    <param name="Volume" value="-1">
    <param name="WindowlessVideo" value="-1">
    <embed type="application/x-ms-wmp"
    pluginspage="https://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx"
    name="MediaPlayer"
    src="https://streamURI:port/"
    width="170"
    height="70"
    autostart="0"
    volume="100"
    SHOWSTATUSBAR="1">
    </embed></object>

    With this code FIREFOX gets the required plugin from https://port25.technet.com with MP10. Without this FF cannot load embeded MPlayer if it hasn’t the plugin already.

    And i think this code should be put at wma.php but haven’t test it yet.

    Nice hack JimAtWCU!

    I ve tried the plugin and didnt work so i had embed a media player in a text widget and also had an external php file checking stream status.

    But after your hack i think i’m gonna play with this plugin which seems intergrating well at your blog.

    Thx!

    PS: It would also be useful if a moderator could change the title so ppl which are interesting at this shoutcast plugin should find it more easily.

    deuced

    (@deuced)

    I would suggest that you take a look at Show/Hide Comments plugin which shows or hide tha whole block of comments.

    Thread Starter deuced

    (@deuced)

    I fix a bit of the code and finally create the plugin i needed. More info in it’s page here. So this topic is marked as resolved.

    Thread Starter deuced

    (@deuced)

    hello

    i tried to search for a plugin that could do my job done but couldnt find any

    the most helpful one was the ShowHideComments of José Lopes but it does hides the whole block of comments.

    So i thought that i could search a bit and see how this plugin could suit my needs.
    I m not a programmer and know nothing of javascript and only a bit of PHP that why i want, if anyone is interested, to test it and see the code cause i m not sure if i m on the right path.

    what i ve done is made a plugin named collapsiblecomments which shows the excerpt of comments and by demand expand the comments you want to read inline one by one

    You can download the plugin from my blog from this link and here is the code if anyone could suggest something better:

    if(function_exists('load_plugin_textdomain'))
            load_plugin_textdomain('collapsible-comments','wp-content/plugins/collapsible-comments');
    
    /* START FUNCTION */
     function collapsiblecomments () {
    
    /* COMMENT TEASER */
    		echo "<div id=\"id\" align=\"left\">";
    		echo "<a href=\"#comment-", comment_ID(), "\"> </a></div><font color=\"#808080\">Comment Excerpt:</font>", comment_excerpt();
    /* COMMENT TEASER */	  
    
    /* And a bit of CSS around */
        echo "<style type=\"text/css\">";
        echo ".text{display: none;}";
    /*    echo "#text{display: block;}; */
        echo "</style>";
    /* End of CSS block */
    
    /* And there is where the Javascript Starts */
        echo "<script type=\"text/javascript\">";
    /*
    Global "swap" holder
    Use value, null, if no layer initially visible
    */
    
        echo "
    
    var currlayerid = \"id\";
    
    function togLayer(id)
    {
    if(currlayerid) setDisplay(currlayerid, \"none\");
    if(id)setDisplay(id, \"block\");
    currlayerid = id;
    }
    
    function setDisplay(id,value)
    {
    var elm = document.getElementById(id);
    elm.style.display = value;
    }
    </script>
    
    ";
    /* And there is where the Javascript ends */
    
    /* step 1. Open a table for the FULL Comment */
        echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"6\" border=\"1\" bordercolor=\"#4e5706\"><tr><td>";
    
    /* And the code for toggle the comments starts here */
        echo "<a href=\"#\" onclick=\"togLayer('", comment_ID(), "');return false;\">Read the FULL comment</a>
    <br>";
    /* step 2. Show the FULL Comment (if u want) */
        echo "<div id=\"", comment_ID(), "\" class=\"text\"><font color=\"#CC000\">FULL:</font>", comment_text(), "</div>";
    /* Now close the FULL Comment */
        echo "<a href=\"#\" onclick=\"togLayer(null)\">Close Comment</a>";
    /* And the code for toggle the comments ends here */
    
    /* Step 3. Close the FULL comment table now */
        echo "</td></tr></table></p>";
    
    	}
    /* END FUNCTION */
Viewing 15 replies - 106 through 120 (of 121 total)