News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How do I modify the index area below the header?

Started by Anjuna, July 15, 2015, 02:31:43 AM

Previous topic - Next topic

Anjuna

#20
PM sent.

Anjuna


margarett

OK, I now had access to the file and the issue is clear.

First of all, get used to Notepad++. It's a great tool and allows you to spot these quick problems with ease. This is how your code looks like, as it is on the file (I masked the urls as you did too)


Everything which is direct HTML is colored gray in Notepad++. PHP's syntax is highlighted.
A single quote is a delimiter in PHP. That's why your "don't" breaks the code.
Single quotes always need to be escaped in PHP: ' becomes \' (as you might have guessed \ is the escape character)

There are some further errors with you code (eg, your first "div" misses the opening "<")

This should work:
else
{
echo '
<div style="float:left; width: 50%">
<h3>your_title_here</h3>
<p>New here? Head over to the <b><a href="xxxxxxxxxxxxxxx/about">About</a></b> page to learn about how things work here. </p>Also, it is highly recommended that you take a look at the <b><a href="xxxxxxxxxxxx/rules">Community Rules</a></b> before posting!</p>
<p>Don\'t forget to have fun!</p>
</div>
<img src="xxxxxxxxxxxxx.jpg" style="float:right;" />';
}
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Anjuna

You're a real saviour, buddy.  ;D

I would have gone and tried to implement it, but now I'm unable to login. I've already created a seperate thread for that, as you already know   :P

Anjuna

#24
Quote from: margarett on July 21, 2015, 05:12:14 AM
OK, I now had access to the file and the issue is clear.

First of all, get used to Notepad++. It's a great tool and allows you to spot these quick problems with ease. This is how your code looks like, as it is on the file (I masked the urls as you did too)


Everything which is direct HTML is colored gray in Notepad++. PHP's syntax is highlighted.
A single quote is a delimiter in PHP. That's why your "don't" breaks the code.
Single quotes always need to be escaped in PHP: ' becomes \' (as you might have guessed \ is the escape character)

There are some further errors with you code (eg, your first "div" misses the opening "<")

This should work:
else
{
echo '
<div style="float:left; width: 50%">
<h3>your_title_here</h3>
<p>New here? Head over to the <b><a href="xxxxxxxxxxxxxxx/about">About</a></b> page to learn about how things work here. </p>Also, it is highly recommended that you take a look at the <b><a href="xxxxxxxxxxxx/rules">Community Rules</a></b> before posting!</p>
<p>Don\'t forget to have fun!</p>
</div>
<img src="xxxxxxxxxxxxx.jpg" style="float:right;" />';
}


Works like a charm!  ;D
Only one problem left:



The link leading to the site's homepage is still floating around there. I don't want it to be displayed in the homepage. How do I achieve that?

Anjuna

I know this is generally frowned upon, and I apologise in advance for being impatient, but bump

Shambles

Quote from: Anjuna
I know this is generally frowned upon, and I apologise in advance for being impatient, but bump

So why do it, after just 3 hours?

margarett

Yeah bumping after 24h is fine but 3h is really short ;)

Anyway...
Which link is it? The "Home" before the "About" in the menu?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Anjuna

Quote from: Shambles on July 22, 2015, 03:40:27 AM
Quote from: Anjuna
I know this is generally frowned upon, and I apologise in advance for being impatient, but bump

So why do it, after just 3 hours?
Quote from: margarett on July 22, 2015, 05:13:29 AM
Yeah bumping after 24h is fine but 3h is really short ;)

I'll say it for you, I'm an impatient help vampire, lmao.


Quote from: margarett on July 22, 2015, 05:13:29 AM
Anyway...
Which link is it? The "Home" before the "About" in the menu?

Sorry I wasn't really specific. I meant this:



It's unattractive and it's screwing up my image placement. So how do I make the linktree disappear entirely? I understand that it can be useful, but I don't want it anymore.

Sir Osis of Liver

index.template.php

Look for something like this -



// Show the navigation tree.
theme_linktree();


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

                                     - R. Waters

Steve

Quote from: Anjuna on July 23, 2015, 12:13:57 AMI'll say it for you, I'm an impatient help vampire, lmao.

That doesn't excuse you doing it.

The support team are all volunteers and have limited time to help as many people as they can. Bumping your topic in less time than the rules allow makes it seem like you think your problem is more important than anyone else's and that simply isn't the case. And it could potentially have the side effect of you not receiving help in ANY kind of timely manner.
DO NOT pm me for support!

Advertisement: