TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 582
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 329
  • Total: 329

Help with removing user login on tp main page and adding banner in its place

Started by coldthunder, September 15, 2012, 09:02:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

coldthunder

Forgive me if this been posted before, but i did search and couldnt find what i was looking for.

I want to be able to add a 900x110 size png file banner on the main portal page in place of the user login information that is there now ( have a user block so don't need it on top of the page like that). So id like to put the banner in its place and have the banner stay the same size but center itself no matter what size screen a user has.

Can someone please tell me what file i would have to edit to do that and what code to add? It is on the default smf 2.0.2 theme and im using the latest tinyportal version.

thank you sincerely for your help

coldthunder


ZarPrime

coldthunder,

Welcome to the TinyPortal Support site.

Quote from: coldthunder on September 15, 2012, 09:02:08 PM
Forgive me if this been posted before, but i did search and couldnt find what i was looking for.

You are probably right.  The issue you mention has probably never been discussed here.  Why?  Well, because it sounds like what you are trying to do is to edit the default curve theme to remove parts of the standard header and add a banner.  This is really not a TinyPortal issue.  Have you checked over at the Simple Machines site to see if there are any topics concerning what you are trying to do or asked for help over there?  In any case, read on.

Quote from: coldthunder on September 15, 2012, 09:02:08 PM
I want to be able to add a 900x110 size png file banner on the main portal page in place of the user login information that is there now ( have a user block so don't need it on top of the page like that). So id like to put the banner in its place and have the banner stay the same size but center itself no matter what size screen a user has.

So, you want to do this only on the FrontPage of your site and not on the other pages of your site like the Forum BoardIndex, Calendar, profile page, etc.?  If you made these changes to all the pages of your site in the theme, it would obviously be much easier than just putting it on the FrontPage.  It other words, every page would have the banner and the user info could also be removed, or hidden, from every page and it would be a lot less work.  If you wanted to do this on just the Frontpage though, the easiest way to add the banner would be to put it into a TP top block.that would show only on the FrontPage.  Still, the block would not be in the header but below it.  You could also explore another avenue.  You could attempt to place the banner into the header by using an SMF Mod called "Global Headers and Footers".  That Mod is located at this link --> http://custom.simplemachines.org/mods/index.php?mod=351

As far as centering an image, like a banner, for different screen resolutions, this is problematic for various reasons at the best of times.  Let me give you a google search parameter that will give you some links where you can read about why it is so difficult and some of the tricks that you might be able to use to do just that.  Click this link --> Let me google that for you!

Quote from: coldthunder on September 15, 2012, 09:02:08 PM
Can someone please tell me what file i would have to edit to do that and what code to add? It is on the default smf 2.0.2 theme and im using the latest tinyportal version.

When asking for support here, it is really not sufficient to tell us that you are using the default SMF theme and the latest version of TinyPortal.  We need to see these things for ourselves.  This is why we ask you to Please read the Posting Guidelines and give us the information that is requested in that topic.  For instance, all of these items are really important if we are to attempt to help you in the most expedient manner ...

Link to my site: http://www.yourdomain.com
SMF version: SMF ver. here
TP version: TP ver. here
Default Forum Language: Your Default Forum Language here
Theme name and version: Theme name here
Browser Name and Version: Browser name/version here
Mods installed: Mods listed here
Related Error messages: Error message here

ZarPrime

coldthunder

Thank you for the response, yes i would like to do it for the whole forum on all pages so yes it is a SMF issue. I have posted it over there and gotten no response and i know people here are generaly very helpful and though if i posted it here someone that knows smf or coding may be able to help me with it.

I will try and continue my search over there:

Link to my site: http://www.thundazone.com/Test/index.php
SMF version: 2.0.2
TP version: 1.0  TinyPortal © 2005-2012
Default Forum Language: English
Theme name and version: Default SMF theme  Curve
Browser Name and Version: Firefox 15.0.1
Mods installed: Tiny portal, SMFpacks shoutbox,google membermap, gamer ids
Related Error messages: NA

If you look at test site above you will see the header im trying.

Thank you

ZarPrime

OK, I looked at your site last night and I see a couple of things that I would change slightly.

First of all, the banner that you put at the top looks good where you put it.  Most people that do custom themes like Crip and Maxx use some css to place their logo in the right place with "#logo a" but using "a img" instead seems to have worked pretty good for you.  On the banner, the one thing I would consider doing in the .../Themes/default/css/index.css file is to add a little bottom padding to that property, something like this ...

Code (Find) Select

/* No image should have a border when linked. */
a img
{
border: 0;


Code (Replace With) Select

/* No image should have a border when linked. */
a img
{
border: 0;
    padding-bottom: 10px
}


That takes care of the banner placement.  I don't know if this will affect other images but it looks good for the banner.

Also, you seem to have lost the left side of the curve css when you added the #header_top.  To get that back, I would look for ...

Code (Find) Select

/* Styles for the general looks for the Curve theme.
------------------------------------------------------- */

/* the framing graphics */
#header_top { background: url(../images/oldlogo.png) no-repeat; margin 0 auto;}
{
background: url(../images/theme/main_block.png) #fefefe no-repeat 0 -480px;
padding-left: 20px;
}

#header div.frame
{
background: url(../images/theme/main_block.png) no-repeat 100% -480px;
display: block;
padding: 5px 20px 1em 0;
}


Code (Replace With) Select

/* Styles for the general looks for the Curve theme.
------------------------------------------------------- */

/* the framing graphics */
#header_top { background: url(../images/oldlogo.png) no-repeat; margin 0 auto;}
{
background: url(../images/theme/main_block.png) #fefefe no-repeat 0 -480px;
padding-left: 20px;
}

#header
{    background: url("../images/theme/main_block.png") no-repeat scroll 0 -480px #FEFEFE;
    padding-left: 20px;
}

#header div.frame
{
background: url(../images/theme/main_block.png) no-repeat 100% -480px;
display: block;
padding: 5px 20px 1em 0;
}


That will add the curve back to the left side of the header.

OK, so, that takes care of fixing the css issues.  The only thing left is to remove or hide the user login info in the header.  However, I was thinking about something.  Do you want to remove the search in the right side of the header as well?  You might as well do that as well since you could add a TP search block into the left panel.  If you want to remove or hide both the user login info and the search, there might be a better way to just hide it rather than actually remove it from the code.  In the right side, at the top of the header, right below the banner, where it says [Auctor Dolor ~ "Authors of Pain"], do you see small white arrow pointing up that looks like this --> ^ ?  That's a link that will shrink the header.  If you click that on your site, the header will collapse and be hidden.  If we could find the code that controls this link in the SMF core code so that it would default to collapsed rather than expanded, that would hide those items in the header that you want to remove.  That way, you wouldn't have to actually remove the functionality but hide it instead and if your users wanted to see those items in the header, they could expand it and collapse it as they saw fit.  If you want to do this instead, we could ask Ichbin where that code might be and see if we could default it to collapsed.  I say that Ichbin could help us with this better than I because he knows the SMF code better than I do.

Let us know what you think.

ZarPrime

coldthunder

ZarPrime,
  Thank you very much for taking a look at it. I will add the items you mentioned to the css and add the missing part of curve back. Thank you kindly for those suggestions. As far as using the #logo if i knew how to put that code in i would of but know nothing of coding and css files. What i put in i found on smf somewhere as a example and i just tried it and it worked. Would rather have it done the right way but i did what i could  by copying someone suggestion for something else :-)

Back in the old days i used one of crips themes and he helped me do what i wanted with his theme, but since smf changed and im using the default theme i didn't know what files to alter to get the same affect. Below is what cript did for me on his theme which is what i wanted to accomplish with these new version of smf and TP


As far as the login and search, yes i originally wanted that entire section removed by putting the banner in its place (like above on cripts theme) but the shrinking of that sounds like a great alternative. If we could find the code to shrink that automatically for all users then i think what would solve what i want to accomplish.

Ichbin, if you have some time and could help me with that i would appreciate it. I will also try and search the smf site to see if anyone else has asked for that code.

Again, thank you very much


This website is proudly hosted on Crocweb Cloud Website Hosting.