Author Topic: move categories  (Read 10374 times)

0 Members and 1 Guest are viewing this topic.

Offline nobita

  • Jr. Member
  • **
  • Posts: 61
  • ondesktop.org
    • View Profile
    • Car Wallpapers
move categories
« on: December 14, 2006, 11:55:06 AM »
I want to move all categories to left column and create new right colum look like the picture i attached.

Plz help me!

Thanks!

manurom

  • Guest
Re: move categories
« Reply #1 on: December 14, 2006, 01:49:01 PM »
Hello;
you will have to edit your template and make some changes. For instance, in the template "default" provided in the script, edit the file "home.html"
Find and delete:
Code: [Select]
{if categories}
                  <table width="450" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="head1">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr>
                            <td class="head1" valign="top">{lang_categories}</td>
                          </tr>
                          <tr>
                            <td class="row2" valign="top">{categories}</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                  <br />
                  {endif categories}{lang_site_stats}<br />

Find:
Code: [Select]
{endif random_image}After, add:
Code: [Select]
{if categories}
                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="head1">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr>
                            <td class="head1" valign="top">{lang_categories}</td>
                          </tr>
                          <tr>
                            <td class="row2" valign="top">{categories}</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                  <br />
                  {endif categories}{lang_site_stats}<br />

Categories wil be shown in your left panel. You can replace "table with="100%"" with your own left panel width, i.e. "table width="150"".
Next, make a right row in your favourite HTML editor, and insert your own code.

Offline nobita

  • Jr. Member
  • **
  • Posts: 61
  • ondesktop.org
    • View Profile
    • Car Wallpapers
Re: move categories
« Reply #2 on: December 15, 2006, 03:37:34 AM »
... and how do i can to insert a new column (such as: right column). I'll add html code to it.

Thank you for your help!

Offline nobita

  • Jr. Member
  • **
  • Posts: 61
  • ondesktop.org
    • View Profile
    • Car Wallpapers
Re: move categories
« Reply #3 on: December 21, 2006, 08:22:29 AM »
I wish to show categories in every page.

How can I do?


Help me!

Offline BigBlueBall

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: move categories
« Reply #4 on: December 27, 2006, 07:48:58 PM »
I'd like to do exactly the same -- put all the categories in the left column and show them on every page. Great topic!

Offline BigBlueBall

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: move categories
« Reply #5 on: January 06, 2007, 02:24:56 AM »
I wish to show categories in every page.

How can I do?


Help me!

Any suggestions?

manurom

  • Guest
Re: move categories
« Reply #6 on: January 06, 2007, 03:28:31 AM »
Hello;
as we use the template file category_bit.html each time we need to display categories listing, we have to edit each PHP file at the site root that parses it. index.php and categories.php already do it.

Example, in index.php, we find:
Code: [Select]
$templates_used = 'home,category_bit,whos_online,thumbnail_bit';
$main_template = 'home';
index.php parses 4 template files: home.html, category_bit.html, whos_online.html and thumbnail_bit.html, but uses home.html as default template file.
category_bit.html is parsed to display category listing, whos_online.html to display online visitors at the bottom of the page, thumbnail_bit.html to display new images.



If we want to add category listing to image details, we find in details.php:
Code: [Select]
$main_template = 'details';
Let us replace by:
Code: [Select]
$templates_used = 'details,category_bit';
$main_template = 'details';
(we do not add the .html suffix) so we are able in details to parse category_bit.html template, to display a category listing in details.html page, as described before.

We will have to do the same modification in lightbox.php, member.php, register.php, search.php, top.php... and make needed changes in template files like lightbox.html, member.html, register.html, etc...

I would feel sorry to be not understood, as I am french, think in french , translate it to english and write it as well as I manage. Anyway, feel free to contact me by the forum or PM. I would help as far as I can.

Offline picster

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • enzos-fineart-gallery
Re: move categories
« Reply #7 on: January 11, 2007, 10:01:29 PM »
Hi Manurom,

your solution seems to be that simple, but unfortunately I don't get this to work. I have done all the preparations as you described, but the category-bit is still shown at the index-page. Did I miss something? Are there additional places where to set the variables?

Thanks in advance - merci beaucoup :o
picster

Offline picster

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • enzos-fineart-gallery
Re: move categories
« Reply #8 on: January 12, 2007, 10:19:42 PM »
Hi,

I think I figured it out :)

if you are going to show also the category-panel on other pages, you have, additionally to what manurom has written, to do this:

open index.php and find around line 75:
Code: [Select]
//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------
$categories = get_categories(0);
if (!$categories)  {
  $categories = $lang['no_categories'];
}
$site_template->register_vars("categories", $categories);
unset($categories);

Now copy this block and insert it into the needed *.php-files (like categories.php, member.php, details.php etc.). Here is an example for the details.php:

find in details.php around line 60:
Code: [Select]
unset($random_cat_image);
below insert the block you just have copied, that it reads  like this:
Code: [Select]
unset($random_cat_image);

//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------
$categories = get_categories(0);
if (!$categories)  {
  $categories = $lang['no_categories'];
}
$site_template->register_vars("categories", $categories);
unset($categories);

So if you have already insertet the Code for your Navipanel the way it's decribed in the #2-post here then you're done. If not do it now and it should work.

Good Luck :)
picster

Offline nobita

  • Jr. Member
  • **
  • Posts: 61
  • ondesktop.org
    • View Profile
    • Car Wallpapers
Re: move categories
« Reply #9 on: January 18, 2007, 01:18:50 PM »
Can insert this above login form?

Thank you!