Fork me on GitHub

MultiHook adding lots of html to every page.  Bottom

  • I've been having trouble with CPU utilization usage warnings from my host. (VPS server)

    In trying to track down anything suspicious I noticed that MultiHook is adding a tremendous amount of code to every page. This can't be good, is it really neccessary?

    Code

    <!-- hidden div to show form for multihook entries -->
    <div id="multihook" >
        <form id="multihook_form" class="z-form" action="#">
            <div class="z-formrow multihookheader">
                <a onclick="this.parentNode.parentNode.visiblity=hidden;" href="http://code.zikula.org/multihook" title="MultiHook v5.2"><strong>MultiHook v5.2</strong></a>
            </div>

            <div class="z-formrow">
                <label for="mhnew_short">Short version</label>
                <input readonly="readonly" type="text" name="mhnew_short" id="mhnew_short" value="" />
            </div>

            <div class="z-formrow">
                <label for="mhnew_long">Long version</label>
                <input type="text" name="mhnew_long" id="mhnew_long" value="" />

                <em class="z-sub z-formnote">(in case of a link the url, ignored for illegal words)</em>
            </div>

            <div class="z-formrow">
                <label for="mhnew_title">Title</label>
                <input type="text" name="mhnew_title" id="mhnew_title" value="" />
                <em class="z-sub z-formnote">(only necessary for a link, ignored for illegal words)</em>
            </div>

            <div class="z-formrow">
                <label for="mhnew_language">Language</label>
                <span><select name="mhnew_language" id="mhnew_language">
    <option label="All" value="">All</option>
    <option label="English" value="en" selected="selected">English</option>
    </select>
    </span>
            </div>

            <div class="z-formrow">
                <label for="mhnew_type">Type</label>
                <select name="mhnew_type" id="mhnew_type">
                    <option value="0">Abbreviation</option>
                    <option value="1">Acronym</option>
                    <option value="2">Link</option>
                    <option value="3">Illegal word</option>

                </select>
            </div>

            <div class="z-formbuttons">
                <button type="submit" onclick="submitmultihook();return false;">Submit</button>
                <button type="reset" onclick="cancelmultihook()">Cancel</button>
            </div>
        </form>

    </div>
    <!-- end of hidden form for multihook -->

    <!-- hidden div to show edit form for multihook entries -->
    <div id="multihookedit" >
        <form id="multihookedit_form" class="z-form" action="#">
            <div class="z-formrow multihookheader">
                <a onclick="this.parentNode.parentNode.visiblity=hidden;" href="http://code.zikula.org/multihook" title="MultiHook v5.2"><strong>MultiHook v5.2</strong></a>
            </div>

            <div class="z-formrow">

                <label for="mhedit_short">Short version</label>
                <input readonly="readonly" type="text" name="mhedit_short" id="mhedit_short" value="" />
            </div>

            <div class="z-formrow">
                <label for="mhedit_long">Long version</label>
                <input type="text" name="mhedit_long" id="mhedit_long" value="" />
                <em class="z-sub z-formnote">(in case of a link the url, ignored for illegal words)</em>

            </div>

            <div class="z-formrow">
                <label for="mhedit_title">Title</label>
                <input type="text" name="mhedit_title" id="mhedit_title" value="" />
                <em class="z-sub z-formnote">(only necessary for a link, ignored for illegal words)</em>
            </div>

            <div class="z-formrow">

                <label for="mhedit_language">Language</label>
                <span><select name="mhnew_language" id="mhedit_language">
    <option label="All" value="">All</option>
    <option label="English" value="en" selected="selected">English</option>
    </select>
    </span>
            </div>

            <div class="z-formrow">
                <label for="mhedit_type">Type</label>

                <select name="mhedit_type" id="mhedit_type">
                    <option value="0">Abbreviation</option>
                    <option value="1">Acronym</option>
                    <option value="2">Link</option>
                    <option value="3">Illegal word</option>
                </select>
            </div>

            <div class="z-formrow">
                <label for="mhedit_delete">Delete entry</label>
                <input type="checkbox" name="mhedit_delete" id="mhedit_delete" value="1" />
            </div>

            <div class="z-formbuttons">
                <input type="hidden" name="mhedit_aid" id="mhedit_aid" value="" />
                <button type="submit" onclick="submiteditmultihook();return false;">Submit</button>

                <button type="reset" onclick="cancelmultihook()">Cancel</button>
            </div>
        </form>
    </div>
    <!-- end of hidden form for multihook -->

    <!-- hidden information -->
    <div id="multihookinformation" >
        <div><button id="multihookinformationclose" onclick="javascript:hideInfo();">x</button></div>
        <div id="multihookindicator"><img src="/modules/MultiHook/pnimages/ajaxindicator.gif" alt="" width="16" height="16" /></div>

        <div id="multihookinformationcontent"></div>
    </div>
    <!-- end of hidden information -->


    --
    Damon
    Catamaran Sailing at TheBeachcats.com
  • More than the HTML being added by MultiHook (that is not as CPU consuming) as the transform Hook itself.

    The HTML is added for Admins only (edit purposes, etc), but the processing of the module contents by the transform Hook is the heavy part. You should enable it ONLY where it's needed.

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Thanks Mateo, I don't know why it didn't occur to me that the HTML was only for admins.

    I'm not really using MultiHook features (although would like to) so I've disabled the module for now.

    --
    Damon
    Catamaran Sailing at TheBeachcats.com

This list is based on users active over the last 60 minutes.