Could anyone tell me how I'd go about doing this?
You know the part up top that has:
Welcome back, {username}. You last visited: Today, 12:18 PM (User CP -- Log Out)
View New Posts | View Today's Posts | Private Messages (New 0, Unread 0, Total 15)
That part.
Of course, if the user isn't logged in, I want it to display accordingly.
You know... this:
Hello, Guest!
(Login -- Register)
I could do without the "current time" and "buddy list" on the right-hand side, but if that's not possible... no worries.
I've searched the forum quite a bit and haven't found what I'm looking for. There have been a few things here and there that do part of this, but not the entire thing.
...at least as far as I can see.
Thanks.
Well yes you can remove current date.
by editing
header_welcomeblock_guest template and removing
<span style="float:right;">$lang->welcome_current_time</span>
that if u wanted to remove it for guests.
now in case you want to remove date and buddy list for registred, you will need to edit
header_welcomeblock_member
and remove
<span style="float:right;">$lang->welcome_current_time</span>
and
<span class="links">
<a href="#" onclick="popupWin('misc.php?action=buddypopup', 'buddyList', 170, 300);">$lang->welcome_open_buddy_list</a>
</span>
regards
I know that. I don't want to get rid of that stuff for my forum, though - just when calling the $welcomeblock to my index page.
My main question/concern, though, is just getting any form of the $welcomeblock called to my main site.
Thanks.
Thanks m8, works great except for one thing:
It doesn't bring over the background color that the forum uses behind this information. Instead, it just brings the text and has a transparent background.
It's not that big of a deal, though... so if it's not an easy fix, no worries.
I appreciate your help.
Thank you.
EDIT
One more thing:
How would I call the header links "Search, Member List, Calendar, Help" without calling the entire header file?
Cheers.
hello there,
for the 1st issue.
Have you added
$headerinclude to your code. coz read what i have mentioned above yesterday.
For the sec thing, well yeah , you can add to the previous code
<div class=\"menu\">
<ul>
<li><a href=\"$settings[bburl]/search.php\"><img src=\"$theme[imgdir]/toplinks/search.gif\" border=\"0\" alt=\"$lang->toplinks_search\" />$lang->toplinks_search</a></li>
<li><a href=\"$settings[bburl]/memberlist.php\"><img src=\"$theme[imgdir]/toplinks/memberlist.gif\" border=\"0\" alt=\"$lang->toplinks_memberlist\" />$lang->toplinks_memberlist</a></li>
<li><a href=\"$settings[bburl]/calendar.php\"><img src=\"$theme[imgdir]/toplinks/calendar.gif\" border=\"0\" alt=\"$lang->toplinks_calendar\" />$lang->toplinks_calendar</a></li>
<li><a href=\"$settings[bburl]/misc.php?action=help\"><img src=\"$theme[imgdir]/toplinks/help.gif\" border=\"0\" alt=\"$lang->toplinks_help\" />$lang->toplinks_help</a></li>
</ul>
</div>
regards
What I did was put:
<?php
chdir('forum');
require './global.php';
?>
at the very top of the code.
Then I put:
<?php
echo "$headerinclude
<div id=\"panel\">
$welcomeblock </div>";
?>
at the spot I wanted to call the $welcomeblock
Is that not how I was supposed to do it?
I couldn't just input it the way you typed it out in your post due to it resulting in errors... so I assumed this is what you meant.
As for the second thing (calling the header links), that didn't work.
Also, I need to call them in a separate spot than the $welcomeblock (just FYI).
You'll need to be more specific with directions I'm afraid.
My PHP knowledge is pretty much non-existent.
Thanks!
Sorry for the hassle, but I appreciate it.
Umm never mind, could you please send me the file you are trying to edit, so i can have a look at your codes.
Regards
Just any basic website file that's outside of the forum directory:
<?php
chdir('forum');
require './global.php';
?>
<html>
<head>
<!--Insert whatever header info you want-->
</head>
<body>
<?php
echo "$headerinclude
<div id=\"panel\">
$welcomeblock </div>";
?>
</body>
</html>
As is, that code calls the $welcomeblock fine (except for the background color).
But the code you suggested for calling the header links results in errors, unfortunately. Just a bunch of links show up that say "$lang->toplinks_search" or whatnot.
Thanks for the help.
create a php file with these content
<?php
require "./global.php"; ?>
<html>
<head>
</head>
<body>
<?php
echo "$headerinclude <div class=\"menu\">
<ul>
<li><a href=\"$settings[bburl]/search.php\"><img src=\"$theme[imgdir]/toplinks/search.gif\" border=\"0\" alt=\"$lang->toplinks_search\" />$lang->toplinks_search</a></li>
<li><a href=\"$settings[bburl]/memberlist.php\"><img src=\"$theme[imgdir]/toplinks/memberlist.gif\" border=\"0\" alt=\"$lang->toplinks_memberlist\" />$lang->toplinks_memberlist</a></li>
<li><a href=\"$settings[bburl]/calendar.php\"><img src=\"$theme[imgdir]/toplinks/calendar.gif\" border=\"0\" alt=\"$lang->toplinks_calendar\" />$lang->toplinks_calendar</a></li>
<li><a href=\"$settings[bburl]/misc.php?action=help\"><img src=\"$theme[imgdir]/toplinks/help.gif\" border=\"0\" alt=\"$lang->toplinks_help\" />$lang->toplinks_help</a></li>
</ul>
</div>
<div id=\"panel\">
$welcomeblock </div>";?>
</body>
</html>
regards