Categories Image & Description

Discussion in 'Core Feature Requests' started by shawnlg777, Jul 12, 2018.

  1. shawnlg777

    shawnlg777 New Member

    I would love to see a category image and a description that is different than the one that is used or the meta tag, preferably one that I can add images or other media.
  2. Mark
    • Staff

    Mark Administrator Staff Member

    category image could be done easily with some clever use of tags

    <img src="skins/{$skin_name}/images/{$category_url}.jpg" alt="{$category}">

    Category Description with additional media might be best handled via a simple plugin. It may be a nice addition to the core if some other users think it would be useful.
  3. Basti
    • Staff

    Basti Administrator Staff Member

    I believe category_url isn't available like that. Only within the ranking table layout ( each member) or details page. If one wanna use it as an intro it wont work if I remember right.
    Would have different values depending of which member is listed last on home page ( each member overwrites category_url if you use it wrapper )

    Attached a real simple plugin, not tested it, but should work
    1) Upload
    2) Add the tag {$category_data} to wrapper.html where you want your data to appear
    3) in the plugin you see, there are no html files yet. That tag above only works if you made html files named like your category url
    3.1) So you have a category named "My super category", the url of that will be "My-super-category"
    3.2) Take that url and create a file in the plugin folder named My-super-category.html
    3.3) Place anything you want in there
    4) {$category_data_url} , I included also, you can use it for img mark posted, but I would still avoid using it globally in wrapper.html with an image without making it interact with the plugin
    4.1) If you wanna use it outside of your new html files, you have to edit the php a bit to avoid a blank tag on wrapper = broken image
    But that is to much for now, dunno if you even need that

    Attached Files:

Share This Page