Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: gumboy - tammikuu 13, 2012, 01:19:49 IP

Otsikko: I Want to wright some lines on posting page?
Kirjoitti: gumboy - tammikuu 13, 2012, 01:19:49 IP
Hi...
i want to wright some lines on posting page like NOTE: Or etc...
How can i do this???
please help me...
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: The Craw - tammikuu 13, 2012, 01:24:42 IP
You mean the page with the form for submitting a new post? That would be ~/Themes/default/Post.template.php
Of if you meant he page that displays posts, that would be ~/Themes/default/Display.template.php
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: gumboy - tammikuu 13, 2012, 01:36:03 IP
ok.. if i want wright 1 line, how could i wright, means, in coding??
i dnt know php...
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: The Craw - tammikuu 13, 2012, 01:39:24 IP
That very much depends on where you want to put your note.
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: gumboy - tammikuu 13, 2012, 01:57:59 IP
i want to wright below "Start New Topic"??
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: The Craw - tammikuu 13, 2012, 05:36:19 IP
Oh, then you want ~/Themes/default/MessageIndex.php.

Search:

echo '
<div class="pagesection">
<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#bot"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
', template_button_strip($normal_buttons, 'right'), '
</div>';


Replce:

echo '
<div class="pagesection">
<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#bot"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
', template_button_strip($normal_buttons, 'right'), '
<br class="clear" />
<div class="floatright">Your text here.</div>
</div>';
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: gumboy - tammikuu 14, 2012, 03:56:38 AP
not working bro....
nothing change after doing this...
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: The Craw - tammikuu 14, 2012, 02:05:35 IP
Can you please screenshot the area you wish to add text to, and post it back here?
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: gumboy - tammikuu 14, 2012, 02:40:30 IP
im attaching below screen-shot where i want to wright...
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: The Craw - tammikuu 14, 2012, 05:09:29 IP
OH! Okay, so back to ~/Themes/default/Post.template.php

Find:

// Start the main table.
echo '
<div class="cat_bar">
<h3 class="catbg">', $context['page_title'], '</h3>
</div>
<div>


Replace:

// Start the main table.
echo '
<div class="cat_bar">
<h3 class="catbg">', $context['page_title'], '</h3>
</div>
Your text here.
<div>

Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: gumboy - tammikuu 15, 2012, 06:35:38 AP
Thanks a lot bro....
you really provide us superb single-handed support...
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: gumboy - tammikuu 15, 2012, 08:08:30 AP
i also have 1 problem... i want the php code for only recent topics without replies... i have which is given below but
its not working for only topics.. its gives both recent topics and replies.. plz help me....

// First param is how many posts you want to show, second and third are for exclude boards and include boards.
// Example to exclude some boards.
// ssi_recentPosts(8, array(1,4,6), null, 'array') <-- this will pull 8 posts from all boards except 1,4, and 6.

// Format ssi_recentPosts($numberOfPosts, $excludeBoards, $includeBoards)
$recentPosts = ssi_recentTopics(20, null, null, 'array');

echo '<ul>';

foreach($recentPosts as $post)
{
     echo '<li>' , $post['link'] , '</li>';
}

echo '</ul>';

Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: The Craw - tammikuu 15, 2012, 12:06:40 IP
That should work. I don't see why you'd be getting recent posts in there too.
Otsikko: Re: I Want to wright some lines on posting page?
Kirjoitti: gumboy - tammikuu 15, 2012, 01:50:28 IP
recent posts are come but when reply comes to the old topic then this old topic is come in the recent posts...
plz help me.. what i hv to do??