News:

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

Main Menu

Recent Topic ssi looks messed up

Started by mischievousx3, February 24, 2011, 10:40:46 PM

Previous topic - Next topic

mischievousx3

http://www.allmerk-noplay.com/index.php - scroll down

I want it to look like my headlines section. I tried adding <div class> didn't work.. :-[
Any suggestions ?

Arantor

Firstly, you're not supposed to directly modify the SSI.php file. There is no reason ever to do so.

How are you currently calling recent topics, and what HTML should be used to format it?

mischievousx3

#2
Well I kept a backup file and I only edited the login form through ssi ^^;
I added the <div class> where I wanted the recent topics, not on ssi.php

my require before <head>:

<?php
require_once('forum/SSI.php');
$_SESSION['login_url'] = 'http://www.allmerk-noplay.com/forum'; . $_SERVER['PHP_SELF'];
$_SESSION['logout_url'] = 'http://www.allmerk-noplay.com' . $_SERVER['PHP_SELF'];
?>

and the topics itself.

<div class="recent">

<?php ssi_recentTopics($num_recent = 3); ?>

</div>

here is the css for "recent"

.recent
{margin: 300px 300px 0px 0px;
width:477px;
border: 0px solid #BBBBBB;
font-size:12px;}

Do I have to add a separate require for recentTopics or something ?

Thanks for helping me, again :)

Arantor

Well, ssi_recentTopics issues its own div, class="ssi_result", in which is a table, class="ssi_table"

I'd start by removing your div, and assigning the CSS rule to .ssi_result .ssi_table to start with. But I'm not quite clear what it is you're trying to achieve, to be honest.

mischievousx3

well, if you look at my page, it's all messed up and all over the place..I want it to look neat as much as possible.

so I changed change it to <div class="ssi_result"> ? it's still like it is..except the font got smaller.
Is there anyway I can remove the board title where the topic comes from? I just want the Topic title, by who, and date.


Arantor

Define what you mean by 'neat as much as possible', i.e. how you want it to actually look and I'll see what I can do

mischievousx3

I want it to look like my headlines section here allmerk-noplay.com/index.php but wider.
And I don't really need the category name..just the topic title, author, and date.

I'm sorry for the trouble. If there's no way to how I want it to be, I'll just leave it out ^.^

Arantor

Of course there's a way for it to be how you want it to be... but I don't have your aesthetic views ;) What is 'clean and neat' to me probably isn't the same for you, which is why I wanted to know *exactly* how it should look. (Personally, I'm a fairly 'minimalist' kinda guy)


<?php
$posts 
ssi_recentTopics(8nullnull'array');
echo '
<table class="ssi_table">'
;
foreach ($posts as $post)
echo '
<tr>
<td class="top">
<a href="'
$post['href'], '" style="font-size: 16px; font-weight:bold;">'$post['subject'], '</a>
<br /><span style="font-size: 9px;">'
$txt['posted_by'], ' '$post['poster']['link'], ' '$txt['on'], $post['time'], '
</td>
</tr>'
;
echo '
</table>'
;
?>


Try that.

mischievousx3

Omg, it's like magic! Lol, it looks perfect, just the way I wanted it to look. thank you so so much.

I also added a <div class> to change the margins, and voila.

Thank you :) Thank you, thank you!

Masterd


Advertisement: