[nodebb-plugin-classic-home] Classical Homepage

NodeBB Plugins
  • It felt like a really long time since I've built a plugin, so this is what I did yesterday:

    NodeBB Classic Homepage

    Classic forum homepage for NodeBB. Don't like the masonry in lavender or the category boxes of vanilla? How about something a little bit more classical? 馃檪

    Installation

    npm install nodebb-plugin-classic-home
    

    Screenshots

    classic forum homepage

    Credits

    Inspiration taken from here. It's a nice template overall, I wonder if they'd be open to having that entire thing built as a NodeBB theme.

    Fork it on GitHub

  • @psychobunny Urge to fork, rising.

    Good job, will have a look at making some more. 馃憤

  • haha looking forward to seeing what you got. It's really simple, all it is, is a drop-in home.tpl replacement and some styling 馃檪

  • @psychobunny I'll see what I can do. 馃槂

  • Great addition.

  • 馃檪 you could emulate forum homepages from whatever software out there either by widgets or this method via a plugin.

    I know we've gotten some stick for trying to recreate the traditonal forum homepage but if you don't like it? NodeBB supports what you want too 馃檪

  • @psychobunny I install it,but how to apply this plugin? I mean how to replace current homepage with this plugin?

  • Did you activate it in the ACP, and then restart your forum?

  • Yeah it doesnt seem to make any changes at BitBangers either? do we need to be on edge? or is latest stable ok?

  • @psychobunny Is this dependent on a newer vanilla or hook? I'm having a similar problem to @Scuzz. Activated, restarted, but no visible changes or options to change.

  • @psychobunny I seem to have the same problem, activated and restarted but no apparent changes, can you look into this?

  • I used npm install nodebb-plugin-classic-home and it installed but doesn't show in my plugin list. What's wrong? I have the latest NodeBB

  • nevermind. I got it to work. thanks

  • @Alex-Mao @Guiri @Scuzz sorry for missing these replies. It works for me on latest NodeBB on Lavender and Vanilla, so likely you may have been using an older version of NodeBB?

  • @psychobunny No problem, we know you are a busy guy! I'm on Latest stable, so 0.4.3?

  • Hmm. I would imagine this should work with 0.4.3

    When you activate and restart the forum, what do you get here? domain.com/templates/home.tpl

    Might also be a plugin conflicting with this, you don't have any plugins overwriting the home template right? Can you let me know what other plugins you have activated?

  • @psychobunny

    It downloads but in the file there is this

    <div class="motd">
    <div widget-area="motd" class="hidden"></div>
    </div>
    
    <div class="row home" itemscope itemtype="http://www.schema.org/ItemList">
    <!-- BEGIN categories -->
    <div class="{categories.class}" data-cid="{categories.cid}" data-numRecentReplies="{categories.numRecentReplies}">
    	<meta itemprop="name" content="{categories.name}">
    	<h4>
    		<!-- IF !categories.link -->
    		<span class="badge {categories.unread-class}">{categories.topic_count} </span>
    		<!-- ENDIF !categories.link -->
    
    		<!-- IF categories.link -->
    		<a href="{categories.link}" itemprop="url" target="_blank">
    		<!-- ELSE -->
    		<a href="{relative_path}/category/{categories.slug}" itemprop="url">
    		<!-- ENDIF categories.link -->
    		{categories.name}
    		</a>
    	</h4>
    
    	<!-- IF categories.link -->
    	<a href="{categories.link}" itemprop="url" target="_blank">
    	<!-- ELSE -->
    	<a href="{relative_path}/category/{categories.slug}" itemprop="url">
    	<!-- ENDIF categories.link -->
    		<div
    			id="category-{categories.cid}" class="category-header icon category-header-image-{categories.imageClass}"
    			title="{categories.description}"
    			style="
    				<!-- IF categories.backgroundImage -->background-image: url({categories.backgroundImage});<!-- ENDIF     categories.backgroundImage -->
    				<!-- IF categories.bgColor -->background-color: {categories.bgColor};<!-- ENDIF categories.bgColor -->
    				color: {categories.color};
    			"
    		>
    			<div id="category-{categories.cid}" class="category-slider-{categories.post_count}">
    				<!-- IF categories.icon -->
    				<div class="category-box"><i class="fa {categories.icon} fa-4x"></i></div>
    				<!-- ENDIF categories.icon -->
    				<div class="category-box" itemprop="description">{categories.description}</div>
    				<!-- BEGIN posts -->
    				<div class="category-box">
    					<div class="post-preview">
    						<img src="{categories.posts.user.picture}" class="pull-left" />
    						<p class=""><strong>{categories.posts.user.username}</strong>: {categories.posts.content}</p>
    					</div>
    				</div>
    				<!-- END posts -->
    				<!-- IF categories.icon -->
    				<div class="category-box"><i class="fa {categories.icon} fa-4x"></i></div>
    				<!-- ENDIF categories.icon -->
    			</div>
    		</div>
    	</a>
    </div>
    <!-- END categories -->
    </div>
    

    I'm pretty sure i dont have anything else overwriting the home page.

    nodebb-widget-essentials
    nodebb-plugin-mentions
    nodebb-plugin-dbsearch
    nodebb-plugin-emoji-extended
    nodebb-plugin-vibration-notifications
    nodebb-plugin-google-analytics
    nodebb-plugin-markdown
    nodebb-plugin-shoutbox
    nodebb-plugin-topic-badges
    nodebb-plugin-youtube
    nodebb-plugin-cards
    nodebb-plugin-classic-home
    nodebb-plugin-custom-pages
    nodebb-plugin-poll
    nodebb-plugin-soundpack-default
    nodebb-plugin-spam-be-gone

  • I'm at a loss then. My only guess would be to try to update to bleeding edge (or maybe you should wait till v0.5 if you want to run stable only) but I was pretty sure that this should have worked on v0.4.3

  • I'll wait until next stable update. I only wanted to test it out to see what i looks like.

  • @psychobunny i really love the simplicity of this theme/plugin (especially when we have many categories and sub-categories the default theme is not good). the 0.5.1 now support sub-categories, does this classic theme/plugin support sub-categories as well? thanks.


Suggested Topics


| | | |