News:

Wondering if this will always be free?  See why free is better.

Main Menu

how to change info center

Started by deep16, February 03, 2015, 05:42:46 AM

Previous topic - Next topic

deep16

How To change info center like this one in the image


Kindred

ummm.... you need more than just an image and saying "like this"

smf version?
what theme are YOU using? (I assume that the image is not actually from your site/theme)

What exactly do you want to do in the info center?   Use words.. pictures serve as a fine explanation to the words -- but words are needed to explain clearly since we can't read minds

Something to do with the table, I assume... but I don't know/understand for sure what, specifically, you are asking.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

deep16

SORRY,

i am using the same theme as in the picture and i want to change


INTO


Illori

so you want to show the recent posts?

http://wiki.simplemachines.org/smf/SMF2.0:Themes_and_Layout#Theme_Settings
Number of recent posts to display on board index - Here you can set the numbers of recent posts that will be displayed in the forum's main index. Set it to zero to disable showing any posts.

deep16

yeah..but how to customise the recent post as showing in the image

Mstcool

So you wanna change the columns basically, right? Like add, or remove, or modify and stuff like that?


Kindred

and this is why you have to use ***WORDS*** - not just images.

Additionally, fully describing what you are trying to do is helpful instead of forcing us to pry each piece of information out of you, and you posting with each response "but that's not what I meant"

Seriously...   describe your entire end goal. not just an image...

Info center is handled in boardIndex.template.php
If all of the data for those columns is alreyad present and your just want to change the layout -- that is the only file you need to touch.


Finally --  you might want to ask in the support topic for whatever theme you are using.
(which you still have not told us...)
SMF version?
Theme?
URL?



(and moving this to graphics and templates, since it is not an actual support request)

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

deep16 - I love this idea ... not sure I'd want the grid (borders) around each section but it would look a lot better than this:


You do need to answer Kindred's questions though. It will make it much easier for someone to help you get what you want. :)
DO NOT pm me for support!

deep16

bro i am honestly saying..i don't know how to explain this problem..i simply want this recent box in my info center and not the default one in the smf..the default recent post box shows only post name but this box is really eye catching..i am using wrap theme and 2.0.9 smf version

Steve

The problem is that you posted two images of totally different sections of the info center.

If you go to theme settings for the Wrap theme in the admin section and change the number of recent posts to display from 0 to some number (as outlined in the link Illori gave you), you'll get a section that looks like the image I posted. That has all the same info you want but it's just not displayed the way you want it, correct?
DO NOT pm me for support!

Kindred

#11
no... the default info center, recent posts shows

post-title by post-author (board-name)            time-of-post


so, it shows all of the information that you show... it is just formatted as a list instead of a table.
(and, quite honestly, tables are generally frowned upon these days, for reasons of responsiveness)

However...   what you are asking for (now that you have more clearly explained) is a simple edit to boardindex.template.php.
Since the WRAP theme has it's own boardindex.template.php, that's what you will edit.


elseif (!empty($context['latest_posts']))
{
echo '
<dl id="ic_recentposts" class="middletext">';

/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
<dd>', $post['time'], '</dd>';
echo '
</dl>';


you would change the above into a table...

elseif (!empty($context['latest_posts']))
{
echo '
<table id="ic_recentposts" class="middletext">';
echo '
<tr><th>Topic:</th><th>Poster:</th></th><th>Board:</th><th>Post Time:</th></tr>';

/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr><td><strong>', $post['link'], '</strong></td><td> ', $post['poster']['link'], '</td><td>', $post['board']['link'], '</td><td>', $post['time'], '</td></tr>';
echo '
</table>';



note: untested and unconfirmed if this does exactly what you have asked for, but it's close.... Always backup before you apply and code changes.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

deep16

bro my forum is dead..using smf is a mess..

now i got this error while posting in every board. The database value you're trying to insert does not exist: id board

Mstcool

To answer your recent post question, it is a part of a theme

deep16


Kindred

ummm...


ok, we are trying to help you, but your answers are less than helpful in response...

Did you apply the code that I suggested?

If so - nothing that I suggested should result in a database error, since none of the content I changed involved the database.


Additionally, I did tell you to BACKUP before doing any of those changes.   Did you?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

deep16

no bro...it is a seperate problem and thanku for your help..your code works but not up to the expectations..thanku so much for your help now i will modify it...i got another problem,do you know about this error "The database value you're trying to insert does not exist: id board" now i got this error while creating a new topic..

Kindred

additional posts removed.

You have marked this as solved AND opened a new topic on the new question. Please do not cross post the same question...

Additional answers on your new problem should be addressed in the other thread.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: