News:

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

Main Menu

Adding contrast to specific text

Started by xabd, June 17, 2018, 08:18:41 PM

Previous topic - Next topic

xabd

Modifying what appears to be a Curves variant. SMF 2.0.15.
I've spent several hours attempting to change the text style in the main index.template.php with almost no success.

The relevant html output:<h3 class="catbg">
    <a class="collapse" href="https://[our_site]/forums/index.php?
        action=collapse;c=10;sa=collapse;d111f832=7acb81b6cb4a2262e193c6c15c46f386#c10">
        <img src="https://[our_site]/forums/Themes/theme1-ver2/images/collapse.gif" alt="-" />
    </a>
    <a class="unreadlink" href="https://[our_site]/forums/index.php?action=unread;c=10">
        Unread Posts
    </a>
    <a id="c10"></a>
    <a href="https://[our_site]/forums/index.php
        action=collapse;c=10;sa=collapse;d111f832=7acb81b6cb4a2262e193c6c15c46f386#c10">
        Welcome to [our site]
    </a>
</h3>

I think I found a BoardIndex.template.php that creates this but it was not in the theme variant files that I am using. I assume that this php file was being included because it is in the "default" theme on our forum. Is that correct?

Since I did not want my edits to affect all users, I added the BoardIndex.template.php file via FTP, closed the browser tab and entered the url again.

However, I am still not able to affect, in the index.css, the style of the html output.
h3.catbg,...
{
    overflow: hidden;
    height: 31px;
    line-height: 31px;
    font-size: 1.2em;
    font-weight: bold;
}
h3.catbg a:link, h3.catbg a:visited, ... h3.catbg, .table_list tbody.header td, .table_list tbody.header td a
{
    color: #fff;
}
...
h3.catbg a:hover, ... .table_list tbody.header td a:hover
{
    color: #fd9;
    text-decoration: none;
}
Any/all help much appreciated!

GigaWatt

Quote from: xabd on June 17, 2018, 08:18:41 PM
Since I did not want my edits to affect all users, I added the BoardIndex.template.php file via FTP, closed the browser tab and entered the url again.

When you overwrite the original BoardIndex.template.php, everyone will be affected by the changes. As far as I know, there is no way to make changes to a theme and the changes to take affect on only one user (let's say it's the admin), unless you've disabled the ability for users to changes themes, you've set every user to use one theme and you're experimenting with another theme.

Did you press Ctrl + F5 when you reloaded the page (clear cache)?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

xabd

I added the BoardIndex.template.php to the theme I had created. I did not move nor edit the BoardIndex.template.php which is in several of the other installed themes. I do not see that file at the root level of the install.

As for ctrl + f5, that sounds like a windows shortcut. :) I'm on a Mac. ;) What I have done on my default browser is to set its cache limit to zero. Of course, if I don't see immediate results from a change/edit, I still use the built-in "empty caches" shortcut.

I am using an FTP app to directly upload local edits on any file. Not using the rather limiting and non-line numbered access in the SMF software.

Apparently the problem is that I cannot get the css to affect the hidden, 4th anchor <a> that shows only in the html. I cannot figure out where or what is creating that linked label that seems hard-coded as the 'normal' label (see attachment).

Aleksi "Lex" Kilpinen

Yes if a file is only in the default theme, it will be included from there.
If your custom theme has a file of it's own, then that can be used to edit only that theme.

I am a little unsure of what you are actually trying to do however, could you tell what is the actual change you want to see?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

Font changes are usually done in index.css, why are you messing with templates?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

GigaWatt

Quote from: xabd on June 17, 2018, 11:12:26 PM
I added the BoardIndex.template.php to the theme I had created.

If there was no BoardIndex.template.php file in the theme you're modding, the theme is using the BoardIndex.template.php of the default theme (Cruve). All of Curve's files are in forum_root/Themes/default.

Quote from: xabd on June 17, 2018, 11:12:26 PM
I do not see that file at the root level of the install.

It's a theme specific file, so the file should be located under forum_root/Themes/name_of_theme, but if a theme doesn't have that file in it's directory, then the theme is using the default BoardIndex.template.php integrated in Curve.

Quote from: xabd on June 17, 2018, 11:12:26 PM
As for ctrl + f5, that sounds like a windows shortcut. :) I'm on a Mac. ;)

Actually, it's an "anything other than a Mac" shortcut ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

xabd

I think we're all on the same page. ;) There is a post here that discusses how these several dozen php files are in the 'standard' theme (Curve) and will be loaded, as needed, if they are not in any particular theme.

I am, indeed, working/editing the index.css, index.template.php files. I copied the (cleverly named) BoardIndex.templat.php file into the theme directory containing all the other theme's files and directories.

I have already replaced some of the uses of the massive main_block.png image. I think CSS has made huge strides since Curve and its variants were created and slicing images is very tedious and difficult, in my personal opinion.

The SMF software does have some user-friendly methods of dealing with many details and protects the underlying php (and javascript) well.

Right now, I am attempting to figure out where the third and fourth anchors are created in the board index html by the BoardIndex.php file.
<a id="c10"></a>   <!-- Is this for use by javascript? -->
<a href="https://[domain].net/forums/index.php?action=collapse;c=10;sa=coll...">
   Welcome to ...</a><!-- This non-specific anchor is not responding
                                       to any added CSS property in index.css -->

I have attempted to specify that anchor element using as many of the parent elements and their classes without success. I suspect that "<a id="c10"></a>" is used so javascript can find that "id" and perform some action. I fear javascript is used to create the "Welcome..." text (which likely comes from some stored variable) and even the styling of that link. I have no intention to start learning javascript, if that is the case. I'm half way to 150 and don't have to many more enjoyable things left in my "bucket"! :laugh:

I would simply like to be able to control the styling of the section texts. I could even forgo making that text a link, since it duplicates the actions of the link at the right-hand end of that bar (and also the icon there).

This is a minor problem (for me) and totally for my individual learning and joy. Thanks for the friendly help!

Gwenwyfar

I still don't think I understand what you are trying to do. We can't tell you what or why things aren't working nor how to do it if we don't see what you are doing or what do you want to do with the link. You may want to attach your boardindex.template here as well, it looks like it may already have been modified from the default.

Quote<a id="c10"></a>   <!-- Is this for use by javascript? -->
This is an anchor ID, to link to the category. ID links are default behavior, not javascript.

And the curve theme for 2.0 was made many years ago, so of course much of it is "outdated". 2.1 is going to come with the "shiny new stuff".
"It is impossible to communicate with one that does not wish to communicate"

Deaks

you have set your browser to lo0w cache limit what about your forum or host?  Have you cleared your forums cache? does your host have a cache control on it?  Also has anyone else got access to the theme and if so do they see the changes, a lot of discussion is going into the tech of the change but nothing really of the other possibilities :P
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Sir Osis of Liver

Just recently had a run-in with cloudflare.  Client had moved to my host, had cf running on his account.  It was caching files, mostly css and images, for days, they never expired.  Changing cf settings and putting it in dev mode had no effect.  I had support remove cf entirely, problem solved.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: