News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Need help finding which files to edit, please.

Started by veteran_hub, March 24, 2017, 12:30:59 AM

Previous topic - Next topic

veteran_hub

I have a simple forum, no registration, one category for simple guest-posting with one-attachment permission, I move the posts into the other read-only category with added guest-permission to view attachments. That's it. I have a plan, you can look for yourself if you'd like.

veteranservice.info which is 2.0.11 updated to 2.0.12 updated to 2.0.13, with c-Panel management through Godaddy.

I'm ok with simple coding, but am lost as to file structure, so I need help finding the files to edit to make a few very simple changes to the default Curve theme.

I'd like to "disable" up_ and down_shrink of the upper section, can I fake that by deleting the code for the "V" images and links? which file please?

I'd like to remove the "Search" and "Register" options/links from the menu-bar, which file please?

I'd like to change the color (the darkish gold) of the "current page" button, and the Forum Title links, which files please?

Thanks in advance for any help.

Colin

All of the default theme files can be found in

Themes/default

Have a peak in index.template.php.

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

veteran_hub

yes, thanks Colin, as you can see if you look at my site, i've played around with index.template.php and had good luck. but i am lost as to where the style edits and sub-scripts i'm looking for are located. i'm probably lost as to how to explain myself as well. basically, like i said, i can't seem to find the correct files/areas to edit to make the changes i want. once i locate them, i'm good to go. i'm not just laying down on the job, i AM actively looking, but having no luck scrolling through one file after another.

br360

Like Colin said; removing the upper section and search option would be in the default index.template.php.

Changing the style and color of the things like forum title links would be in your themes/default/index.css


veteran_hub

#4
ok, i can see that keeping a page-source window open is going to help me find what i'm looking for in file manager. once i become familiar with a few "landmarks" i won't come across as so helpless.

hey i like the "Warning - while you were typing a new reply has been posted."

i want to "force" the upper section to remain open, no up_shrinking allowed, so that visitors can only use the upper search box. Can I accomplish that by simply editing out the image reference, and then not worrying about the script code?

i want to remove the "Search" "Login" "Register" links, and I think i'm on that now. I have bookmarked the "Login" action page for my own use.

and thank you, I see that index.css is something i need to learn my way around.

br360

Try this in index.template.php

Find-
// the upshrink image, right-floated

Right underneath that, remove-
   echo '
<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';


That should make it so that the header is not able to be disabled. Make sure to back up the file first though.

Removing the search and register links will be in your sources.subs.php


veteran_hub

#6
i'm gonna go dive in now. and i sure do save a working copy of ANYthing i mess around with, because i'm just not that good at this.

beauty advice! the up_shrink cut worked! thank you, br360!

br360

Of course and good luck with your forum-I appreciate what you are trying to do with it

veteran_hub

Quote from: br360 on March 24, 2017, 02:14:08 AM
Of course and good luck with your forum-I appreciate what you are trying to do with it
the most difficult part is making it simple enough for people to not get frustrated, and to want to use it.

Antechinus

Quote from: veteran_hub on March 24, 2017, 12:30:59 AMI'd like to remove the "Search" and "Register" options/links from the menu-bar, which file please?

Those are in Sources/Subs.php.

Code (Search button) Select
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),


Code (Register button) Select
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),




QuoteI'd like to change the color (the darkish gold) of the "current page" button, and the Forum Title links, which files please?

Code (Board title links (index.css)) Select
table_list tbody.content td.info a.subject {
    font-weight: bold;
    font-size: 110%;
    color: #D97B33;
}


I'm not sure what you mean by the current page button. Do you mean the active button in the main menu? If so:

Code (index.css) Select
.dropmenu li a.active
{
background: url(../images/theme/menu_gfx.png) no-repeat 100% 0;
color: #fff;
font-weight: bold;
}
.dropmenu li a.active span.firstlevel
{
background: url(../images/theme/menu_gfx.png) no-repeat 0 0;
}


Which quite honestly is a crappy way of doing it these days.

veteran_hub

Thank you, Antechinus. One thing i really appreciate about a good help-forum is that i learn the correct terms, which of course makes finding what i need tons easier.

Quote from: Antechinus on March 24, 2017, 03:44:05 AM

Which quite honestly is a crappy way of doing it these days.
I'm not sure what that means, but since you've said so, I'll hold off on changing the color in case you care to explain, like maybe there's a control panel or other mod for admins. but, if this simple method will work in my case, i like simple.

Antechinus

The reason I said it's crappy is that the button backgrounds are done with images. This was necessary to get the roundy corners back when Curve was made (antique browsers y'know) but is not necessary these days (CSS3 border-radius rocks).

I, and a couple of others, have made Curve variants that ditch most of the images and use CSS instead. That makes changing colours easier because you don't have to do any image editing. Unfortunately I don't have an example to hand, but I can probably dig it up.

Alternatively, you can use an image editor to change the colours for images/theme/menu_gfx.png which has the advantage of not requiring code changes, at the expense of making you mess around with image editing.

Take your pick. :)

veteran_hub

i'm more adept at simple image editing than i am at custom coding, so...crappy method here we go. but now i understand that if i ever build a more involved board i'll want to start with one of the "modern" variants.

this place rocks with the good answers, thanks once again.

Steve

Marking solved then. If you have any other questions regarding this topic, by all means, mark this unsolved and let us know. :)
DO NOT pm me for support!

veteran_hub

thank you, Steve, when i wandered away to play with my new knowledge i admit i forgot to come back and confirm with a "solved." i see by your sig that you know exactly what i mean  ;)

Advertisement: