Hello Guest
No Avatar
Sign In to Remove
Posts: 
9
Reputation: 
1
Posted: August 14, 2011, 6:58 PM
  • Group: Member
Hello :)
I installed your Cadence Theme and played around with it a little bit. In doing so, I found out that the button for the recent post seems to be broken. When I hover over the arrow, it changes colours - so it notizes that. But when I click, nothing happens...I thought clicking it should redirect you to the recent post meantioned next to it?

I added a screenshot of the meantioned part of the board.


If the button is meant to be redirecting you to the recent post...then how can I make it working? It would be a really great feature!

best regards and thanks in advance,
Nightfox
Posts: 
400
Reputation: 
20
Posted: August 15, 2011, 6:53 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
That is not supposed to be linked. It is just some css backgrounds on it with the :hover selector.

You could change it if you knew how to edit the templates by making it a linked image.
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
9
Reputation: 
1
Posted: August 15, 2011, 7:21 AM  -- Last Edit: August 15, 2011, 7:28 AM by Nightfox
  • Group: Member
I know how to edit templates and how to link images. But therefore I need the command for the recent post for the specific boards and the template where I find that button (I expect it is in the index.template.php or in the boardindex.template.php).
Could you give me that information please?

Edit:
Am I right in thinking that this is the variable I'm searching for?: $board['last_post']['link']
Posts: 
400
Reputation: 
20
Posted: August 15, 2011, 7:47 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
I know how to edit templates and how to link images. But therefore I need the command for the recent post for the specific boards and the template where I find that button (I expect it is in the index.template.php or in the boardindex.template.php).
Could you give me that information please?

Edit:
Am I right in thinking that this is the variable I'm searching for?: $board['last_post']['link']

Right you are sir

You can also use: $board['last_post']['href'] - to get the raw url
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
9
Reputation: 
1
Posted: August 15, 2011, 2:20 PM  -- Last Edit: August 15, 2011, 2:49 PM by Nightfox
  • Group: Member
Great, then I need to know where to find this button in the templates, because I couldn't find anything that looked alike so far...

Edit:
Okay, I found it in the index_Original.css
But how can I link the image then?
Code: [Select]
.boardindex_board_lastpost
{
        background: url(../images/_Original/spec/last_post_arrow.png) no-repeat;
        background-position: left center;
        padding-left: 24px;
        padding-right: 38px;
        a{url($board['last_post']['link'])};
       
}

.boardindex_board_lastpost:hover
{
        background: url(../images/_Original/spec/last_post_arrow_hover.png) no-repeat;
        background-position: left center;
}

Edit2:
And another problem...
I thought the Button was meantioned here in the div class. But even if I delete the class, the button is still there...so what have I forgotten?
Code: [Select]
<div class="boardindex_board_lastpost floatright">

<small>
<strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</small>
</div>
Posts: 
400
Reputation: 
20
Posted: August 15, 2011, 10:07 PM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
You do not need the recent post button code.


for example just do:
Code: [Select]
<a href="', $board['last_post']['href'] ,'">
     <img src="', $settings['images_url'] ,'/', $context['theme_variant_url'] ,'spec/last_post_arrow.png" alt="', $context['forum_name'] ,'" />
</a>

Then put that in the lastpost td and remove the background css from the .boardindex_board_lastpost
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
9
Reputation: 
1
Posted: August 15, 2011, 11:09 PM
  • Group: Member
Thanks a lot!
But now, the arrow is next to every board, even if there are no posts written...That's especially disturbing at the redirection boards, because there'll never be any posts...

Is there any way to avoid that? To exclude the redirection boards from that?
Posts: 
400
Reputation: 
20
Posted: August 16, 2011, 1:02 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
Thanks a lot!
But now, the arrow is next to every board, even if there are no posts written...That's especially disturbing at the redirection boards, because there'll never be any posts...

Is there any way to avoid that? To exclude the redirection boards from that?

It should be inside that if loop:
Code: [Select]
if (!empty($board['last_post']['id']))
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
9
Reputation: 
1
Posted: August 16, 2011, 1:57 AM
  • Group: Member
Wow, thanks, now the button functions the way I wanted!