miniBB Support Forums | 15 years on The Web
miniBB ®

miniBB

®
 
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   
 

Modify topic list and post HTML specified by forum number?

 
Author dan12343
Partaker
#1 | Posted: 2 Sep 2016 09:39 
Hey again,

I made a thread a few weeks ago asking how to edit the HTML of main_header. The {$vars} worked perfectly and was exactly what I was looking to do

This is along the same lines, but I just don't know where this code goes

Can I list topics each in their own table? Can I also list posts in a topic in their own table? And can I specify the HTML code in new {$vars} dependant on forum number like my previous thread?

I'm replicating old, now defunct, boards that a game console used to be directed to, and MiniBB is the only thing that does what I need while having a 'modern' look and feel rather than BBS. Point is, I can make a new forum section, and 'reskin' to replicate the original board without a big mess of subdomains and multiple MiniBB installs + combining the DBs

Thanks for any help

Author Paul
Lead Developer
#2 | Posted: 3 Sep 2016 17:01 
dan12343:
Can I list topics each in their own table? Can I also list posts in a topic in their own table? And can I specify the HTML code in new {$vars} dependant on forum number like my previous thread?

Sorry, it doesn't look clear. What do you mean by "table"? HTML table or database table?

Default miniBB already uses HTML tables, if you are about that. Look in /templates/ folder and you will find all of them for topics and posts. main_posts.html for posts, main_topics.html for topics.

dan12343:
I'm replicating old, now defunct, boards that a game console used to be directed to, and MiniBB is the only thing that does what I need while having a 'modern' look and feel rather than BBS. Point is, I can make a new forum section, and 'reskin' to replicate the original board without a big mess of subdomains and multiple MiniBB installs + combining the DBs

I didn't get the idea of it at all. Would be more useful if you just give us URLs and start from that.

Author dan12343
Partaker
#3 | Posted: 5 Sep 2016 22:44 | Edited by: dan12343 
I'm replicating this http://web.archive.org/web/20050308180128/http://tails03.sonicteam.com/bbs/expert_en/index.html here http://bb.dreampipe.net//index.php?action=vtopic&forum=17

And by tables, I'd like to create a new HTML table around each post like this http://web.archive.org/web/20070714155244/http://tails03.sonicteam.com/bbs/expert_en/002256/30/000002.html or this (this is a good example) http://web.archive.org/web/20070403092811/http://tails03.sonicteam.com/bbs/chao_en/003653/10/000000.html

And by table around topics in a forum, I mean this http://web.archive.org/web/20010404230020/http://sega.shoptok.com/boards/topics.html?board_id=1&board_name=Online+Gaming

Author Paul
Lead Developer
#4 | Posted: 5 Sep 2016 23:08 
Like I mentioned above, you could modify

/templates/main_posts.html and /templates/main_posts_cell.html for changing the HTML for posts;
/templates/main_topics.html and /templates/main_topics_cell.html for changing the HTML for topics listing.

As about the very top link you mentioned, miniBB is about another structure of the forum. It's a flat-view~; what you give as an example, is tree-view forum. miniBB doesn't support this structure at all.

Author dan12343
Partaker
#5 | Posted: 6 Sep 2016 00:21 
So I can't edit {$listposts} to display specific HTML for posts depending on the current forum number? If not it's not a huge issue, but I would like to improve the authenticity

For the specific themes of the forums, I replaced the HTML body tag with $specific_body_html1 $specific_body_html2 and so on to replace the theme based on current viewed forum. So if I can edit $listposts, or the equivalent to that for listing topics, I would replace $listposts with $listposts_chao $listposts_sa2 and so on

As far as how MiniBB differs from BBS, I don't want to list posts in that manner anyway. I like the MiniBB format better as it's more modern, I chose MiniBB because of this. And if I can do this, the end result will probably be better than the original

Thanks for your quick replies and support Paul

Author dan12343
Partaker
#6 | Posted: 6 Sep 2016 00:27 
Around November or December I'll likely be inquiring about paid support for a variety of things, not stuff like this, but custom versions of file attaching, and displaying data from an external database (which user authentication for this external SQL DB runs through MiniBB) among other things

Author Paul
Lead Developer
#7 | Posted: 6 Sep 2016 18:45 
{$list_topics} or {$listPosts} are formed when building the cycle of content, based on main_topics_cell and main_post_cell templates. If you want customized HTML for each content's cell, then you should put this HTML the same way in bb_plugins.php. For example:

if(something){
$content_cell='Some HTML 1';
}
elseif(something_else){
$content_cell='Some HTML 2';
}

etc. Then in either main_posts_cell/main_topics_cell replace the whole content to {$content_cell}. Note that you probably just should replicate default template and make HTML changes based on this template. There are a lot of system variables which should be kept untouched. Also, this HTML should be pasted in apostrophes, not quotes. This is important for keeping the content not-executed.

Author dan12343
Partaker
#8 | Posted: 9 Sep 2016 20:30 
Thanks a lot, I'll give this a whirl

""This is important for keeping the content not-executed""

Does this mean MiniBB can execute CGI programs within a page?

Author dan12343
Partaker
#9 | Posted: 9 Sep 2016 20:40 
Don't mean to double bump, but is $content_cell an existing MiniBB $var? Will this end the table between each post?
So

<table bgcolor="#1234" text="1234" etc>
<tr><td>
Post #1 content
</td></tr>
</table>

<br>

<table bgcolor="#1234" text="1234" etc>
<tr><td>
Post #2 content
</td></tr>
</table>
etc?

Thanks again

Author Paul
Lead Developer
#10 | Posted: 12 Sep 2016 21:04 | Edited by: Paul 
dan12343:
Does this mean MiniBB can execute CGI programs within a page?

No, my phrase was about the above mentioned code only. If you put {$something} in quotes (not apostrophes), it will be executed by PHP. It's default PHP behavior, not related to miniBB.

dan12343:
is $content_cell an existing MiniBB $var?

No, it's not an existing var. You could only define it as a standalone var in bb_plugins.php.

Author Guest
#11 | Posted: 5 Feb 2017 20:51 
yes that shows it

Specific miniBB Support Forums / Specific /
 Modify topic list and post HTML specified by forum number?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
↑ TOP