Author Topic: Second Description Box for Categories: $75  (Read 6652 times)

0 Members and 1 Guest are viewing this topic.

Offline IndoX

  • Pre-Newbie
  • Posts: 9
    • View Profile
Second Description Box for Categories: $75
« on: June 29, 2015, 06:33:28 PM »
Hello,

Requesting a paid mod for 1.7.11.

I would like a second description box for categories. Simple enough. Paying $75.

Please PM me if interested.

Regards,
Indo

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: Second Description Box for Categories: $75
« Reply #1 on: March 29, 2024, 07:10:09 PM »
Open: categories.php
Search
Code: [Select]
"cat_description" => htmlspecialchars(format_text($cat_cache[$cat_id]['cat_description'], 1, 0, 1)),Add after
Code: [Select]
"cat_second_description" => htmlspecialchars(format_text($cat_cache[$cat_id]['cat_second_description'], 1, 0, 1)),
Open: global.php
Search
Code: [Select]
$sql = "SELECT cat_id, cat_name, cat_description,find and Replace
Code: [Select]
cat_description,With
Code: [Select]
cat_second_description,
Open: rss.php
Search
Code: [Select]
$rss_desc  = format_rss_html($cat_cache[$cat_id]['cat_description']);Replace with
Code: [Select]
$rss_desc  = format_rss_html($cat_cache[$cat_id]['cat_description']."\n".$cat_cache[$cat_id]['cat_second_description']);
Open: admin/categories.php
Search
Code: [Select]
$cat_description = un_htmlspecialchars(trim($HTTP_POST_VARS['cat_description']));Add after
Code: [Select]
$cat_second_description = un_htmlspecialchars(trim($HTTP_POST_VARS['cat_second_description']));
Search
Code: [Select]
$sql = "INSERT INTO ".CATEGORIES_TABLE."Find
Code: [Select]
(cat_name, cat_description,Replace with
Code: [Select]
(cat_name, cat_description, cat_second_description,Find
Code: [Select]
('$cat_name', '$cat_description',Replace with
Code: [Select]
('$cat_name', '$cat_description', '$cat_second_description',
Search
Code: [Select]
show_textarea_row($lang['field_description_ext'], "cat_description", "", $textarea_size);Add after
Code: [Select]
show_textarea_row("Second ".$lang['field_description_ext'], "cat_second_description", "", $textarea_size);
Search
Code: [Select]
$cat_description = strip_tags(un_htmlspecialchars(trim($HTTP_POST_VARS['cat_description'])), '<div><p><a><strong><bold><i><em><u><h1><h2><h3><h4><h5><h6><span>');Add after
Code: [Select]
$cat_second_description = strip_tags(un_htmlspecialchars(trim($HTTP_POST_VARS['cat_second_description'])), '<div><p><a><strong><bold><i><em><u><h1><h2><h3><h4><h5><h6><span>');
Search
Code: [Select]
        $sql = "UPDATE ".CATEGORIES_TABLE."
            SET cat_name = '$cat_name', cat_description = '$cat_description',
Replace with
Code: [Select]
        $sql = "UPDATE ".CATEGORIES_TABLE."
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_second_description = '$cat_second_description',

Search
Code: [Select]
    $cat_id = (isset($HTTP_POST_VARS['cat_id'])) ? intval($HTTP_POST_VARS['cat_id']) : intval($HTTP_GET_VARS['cat_id']);

    $sql = "SELECT cat_name, cat_description,
Replace with
Code: [Select]
    $cat_id = (isset($HTTP_POST_VARS['cat_id'])) ? intval($HTTP_POST_VARS['cat_id']) : intval($HTTP_GET_VARS['cat_id']);

    $sql = "SELECT cat_name, cat_description, cat_second_description,

Search
Code: [Select]
show_textarea_row($lang['field_description_ext'], "cat_description", $cat_row['cat_description'], $textarea_size);Add after
Code: [Select]
show_textarea_row("Second ".$lang['field_description_ext'], "cat_second_description", $cat_row['cat_second_description'], $textarea_size);
Search
Code: [Select]
    if (isset($HTTP_GET_VARS['closeall'])) {
        $open_all = false;
        $GLOBALS['map'] = array();
    }

    $sql = "SELECT cat_id, cat_name, cat_description,
Replace with
Code: [Select]
    if (isset($HTTP_GET_VARS['closeall'])) {
        $open_all = false;
        $GLOBALS['map'] = array();
    }

    $sql = "SELECT cat_id, cat_name, cat_description, cat_second_description,

Search
Code: [Select]
        if (!$show_all_subcats && !$open_all) {
            $where_sql = "WHERE cat_parent_id IN (".implode(", ", $GLOBALS['map']).")";
        }
        $sql = "SELECT cat_id, cat_name, cat_description,
Replace with
Code: [Select]
        if (!$show_all_subcats && !$open_all) {
            $where_sql = "WHERE cat_parent_id IN (".implode(", ", $GLOBALS['map']).")";
        }
        $sql = "SELECT cat_id, cat_name, cat_description, cat_second_description,

Open: includes/functions.php
Search
Code: [Select]
"cat_description" => htmlspecialchars(format_text($cat_cache[$category_id]['cat_description'], 1)),Add after
Code: [Select]
"cat_second_description" => htmlspecialchars(format_text($cat_cache[$category_id]['cat_second_description'], 1)),
Open: templates/your-template/categories.html
Search
Code: [Select]
                          <br>{cat_description} (Hits: {cat_hits})
                          <hr size="1" />
Replace with (or set {cat_second_description} at a desired position)
Code: [Select]
                          <br>{cat_description} (Hits: {cat_hits})
                          <hr size="1" />
                          {cat_second_description}
                           <hr size="1" />

Open: templates/your-template/category_bit.html
Search
Code: [Select]
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}Add after
Code: [Select]
{if cat_second_description}<span class="smalltext">{cat_second_description}</span><br />{endif cat_second_description}
And then a new column needs to be added in phpMyAdmin.

  • Open: phpMyAdmin
  • Select your database
  • Click on SQL at the top
Enter there
Code: [Select]
ALTER TABLE 4images_categories
ADD COLUMN cat_second_description VARCHAR(255) NOT NULL;
Click OK