• Modifications to allow weblinks to have META Keywords and template variables.#

  • modx@mindspill.net Reply #1, 6 years ago

    Reply
    17/12/2006. I've posted the mods for 0.9.5 in a reply further down the page.
    05/12/2006. The original core code modification was for 0.9.1. I've posted the mod for MODx-095rc3-rev2066 below.
    Hi all.

    I've modified /manager/actions/dynamic/mutate_content.dynamic.action.php to allow weblinks to have META Keywords and template variables.

    The changes were small:
    a) Modified some conditions to allow the META Keywords tab and the TVs to show for weblinks in the manager.
    b) Removed an html hidden field that prevented weblinks being associated with a template.

    The changes were made to allow me to categorise and group weblinks with the aid of a modified DropMenu snippet, which can filter docs by a regexp on their keywords or a TV. http://modxcms.com/forums/index.php/topic,2588.0.html
    Please let me know whether these changes could have any derogatory effects on the operation of MODx.

    Steph

    P.S. I also changed the description field to a textarea, simply to allow more of it to be seen.

    reply url added


  • modx@mindspill.net Reply #2, 5 years, 2 months ago

    Reply
    Here's the modified core code for MODx-095rc3-rev2066 along with the original so you can do a comparison to see what's changed. (remove the .txt extension).

    mutate_content.dynamic.php is the new one.
    mutate_content.dynamic.php.orig is the original.

    It goes in manager/actions/.

    Aargh! It's not letting me post the thing. "Sorry! There is already an attachment with the same filename as the one you tried to upload. Please rename the file and try again." No, it's not! This is the 3rd different name I've tried!

    ...

    If the God of quirks helps me, they'll be posted below.


  • modx@mindspill.net Reply #3, 5 years, 2 months ago

    Reply
    Remove the .1 from the filename. I had to add this to allow me to post it.


  • doze Reply #4, 5 years, 2 months ago

    Reply
    I have wondered that why TV's were disabled from the weblinks in the firstplace.. I know that they are not processed when weblink is accessed, but that doesnt mean that they would not be usefull to have. When you have TV's in weblinks, you can forexample build categorized link list with ditto very easily.. and so on. I suggest to add this change to the core.


  • heliotrope Reply #5, 5 years, 2 months ago

    Reply
    I second that Doze.

    :-)


  • ScottyDelicious Reply #6, 5 years, 2 months ago

    Reply
    +1 on that for me too.
    I have been trying to add categories to my "Friendly Pirates" (links section) as they are varied in content type.

    -sD-


  • opengeek Reply #7, 5 years, 2 months ago

    Reply
    This did not make it into 0.9.5, which was released just a few short hours ago. But I'm definitely all in favor of including this, and we can get it into 0.9.5.1 which will follow shortly, once we have more translations completed.


  • Zaigham (aka zi) Reply #8, 5 years, 2 months ago

    Reply
    Very nice work work steph!
    thanks for sharing.

    regards.


  • modx@mindspill.net Reply #9, 5 years, 2 months ago

    Reply
    Thanks.

    Please note that I've not tested my changes to MODx-095rc3-rev2066. I made these in response to a request from spoetnik at http://modxcms.com/forums/index.php/topic,2588.30.html.

    I'm running 0.9.2.2 so I know the changes are ok with that version. The changes I made to 095rc3-rev2066 were identical to those I made to 0.9.1 (and 0.9.2.2) so provided the new mutate_content.dynamic.php and mutate_content.dynamic.action.php don't differ too much, there should not be a problem. I'm waiting to hear a response from spoetnik on the other thread to see whether it's all ok.

    Since 0.9.5 has been released I'll upgrade, make the mod for that version, test and post when ready. This should be by the end of the week.

    Btw, someone needs to update the button on the homepage to indicate the change from 0.9.2 to 0.9.5.


  • rthrash Reply #10, 5 years, 2 months ago

    Reply
    Update done. Thanks!