TinyPortal

Development => Support => Topic started by: growl on July 18, 2007, 08:44:46 AM

Title: how to hide rigth column in Search and Calendar
Post by: growl on July 18, 2007, 08:44:46 AM
hi!

as of the original default template of smf, how would i hide the right column in search and calendar?
didn't find a button to do so and also couldn't find something corresponding in the code, which doesn't necessarily mean that it isn't there;-)
Title: Re: how to hide rigth column in Search and Calendar
Post by: G6Cad on July 18, 2007, 08:49:50 AM
You have to manually add a short string of code under the first global statment in the calendar.php and search.php in the sources directory.

the string you add right under the global statment is
tp_hidebars();

sources/Calendar.php find

// Show the calendar.
function CalendarMain()
{
   global $txt, $context, $modSettings, $scripturl, $options;


Right under it add
tp_hidebars();

Then the same for the /Sources/search.php

Find
// Ask the user what they want to search for.
function PlushSearch1()
{
   global $txt, $scripturl, $db_prefix, $modSettings, $user_info, $context;


Right under it add
tp_hidebars();
Title: Re: how to hide rigth column in Search and Calendar
Post by: growl on July 18, 2007, 08:54:04 AM
thanks a lot.
ok, this works fine, but is there also a possibility to only hide the right column and leave the rest there?
Title: Re: how to hide rigth column in Search and Calendar
Post by: growl on July 18, 2007, 08:56:55 AM
ok, i've just added the "right" argument and it works fine, so no further assistance is needed. THANKS!
Title: Re: how to hide rigth column in Search and Calendar
Post by: G6Cad on July 18, 2007, 08:59:43 AM
Your welcome :)
Title: Re: how to hide rigth column in Search and Calendar
Post by: Ianedres on July 18, 2007, 05:07:05 PM
I tried this technique with my 'Gallery' function but was unable to hide any of the columns. It works with the calendar, of course.

I'm using the iFrame method to load the Coppermine gallery. Placed it in the gallery.php and gallery.template.php files...

Any ideals?
Title: Re: how to hide rigth column in Search and Calendar
Post by: growl on July 18, 2007, 05:26:52 PM
you could simply include the gallery iframe thing into an article of tinyportal, and then you have all the options whether to show columns, intro etc.
Title: Re: how to hide rigth column in Search and Calendar
Post by: Ianedres on July 18, 2007, 06:17:07 PM
Certainly a viable solution for most applications.

I have my top menu displaying a "Gallery" button; the script modifies that one link so that unregistered members are linked to a page that explains this and prompts for registration... registered members are directed to the gallery as such.

I could, in the article solution, move that code to determine the viewers registration status and remove it altogether from the main menu. That would allow for controlling the columns and would also prevent menu problems with other themes... very interesting.

I use a graphic menu in the left column for a majority of my board's functions... which stays regardless of what theme I use.

Thanks for the suggestion- though I still wonder if it can be done as I have it now. Going to work and try to implement all this.
Title: Re: how to hide rigth column in Search and Calendar
Post by: G6Cad on July 18, 2007, 08:14:35 PM
This method will only work on mods that using the SMF source files, not a standalone script like coppermine.
You need to implement coppermine to your SMF.
There is a guide on SMF forums on how to make that happend.
http://www.simplemachines.org/community/index.php?topic=113488.msg727373#msg727373
It's for SMF 1.1rc3, but should be working with 1.1.3 to
Title: Re: how to hide rigth column in Search and Calendar
Post by: Ianedres on July 19, 2007, 09:25:00 PM
Now that I'm utilizing a PHP article to determine a guest or member, it loads the Coppermine in an IFRAME. Only difference is that SMF/TP determines what columns are displayed prior to loading the frame.

This is more portable and versatile and does not require the loaded frame's script to be integrated with SMF. So I believe that is a better solution as it does not require modification to the loaded script- which reduces errors (and subsequent support problems!)...
Title: Re: how to hide rigth column in Search and Calendar
Post by: growl on July 19, 2007, 09:29:14 PM
Quote from: Ianedres on July 19, 2007, 09:25:00 PM
Now that I'm utilizing a PHP article to determine a guest or member, it loads the Coppermine in an IFRAME. Only difference is that SMF/TP determines what columns are displayed prior to loading the frame.

This is more portable and versatile and does not require the loaded frame's script to be integrated with SMF. So I believe that is a better solution as it does not require modification to the loaded script- which reduces errors (and subsequent support problems!)...


aaaahm, yeah, i agree, because this is exactly what i advised you to do in my reply to  your first post...
Title: Re: how to hide rigth column in Search and Calendar
Post by: IchBin on July 19, 2007, 10:15:11 PM
Did you try adding the hidebar function to your gallery template to make the rightbar disappear? You'll have to explain what you have tried so we aren't over doing things here.
Title: Re: how to hide rigth column in Search and Calendar
Post by: Ianedres on July 19, 2007, 10:36:37 PM
I had added the tp_hidebar() function to the script that loaded the gallery; it did not work. So, as growl suggested, I used that method and moved over some other similar scripts to load the same.

I was able to successfully modify the calendar script to hide it with the function though...
Title: Re: how to hide rigth column in Search and Calendar
Post by: IchBin on July 19, 2007, 10:42:45 PM
Why didn't the tp_hidebar function not work in the gallery script? Are you referring to the SMF gallery? or another gallery?
Title: Re: how to hide rigth column in Search and Calendar
Post by: Ianedres on July 19, 2007, 11:05:29 PM
Quote from: IchBinâ„¢ on July 19, 2007, 10:42:45 PM
Why didn't the tp_hidebar function not work in the gallery script? Are you referring to the SMF gallery? or another gallery?

It is Coppermine... I'm happy with the solution that growl presented though!