Reseller

Started by Daniel, July 28, 2014, 09:19:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Daniel

Quote from: Porr on November 07, 2014, 09:14:58 AM
Thx :-)

I have some problem with the code for question 1. My forum breaks. Maybe a small error. I am not at home so can not debug.

and awnser 2 works perfect  ;D
Sorry, my mistake. The code is:
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members'])){
echo '
<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
}
echo'

Porr

It worked. Thank for the effort you put into it.

Those 2 things where really needed to be fixed before i can make the theme the default :-) The (3th)menu thing is more because of the cool factor. But i can test that later when you had time. I will make some minor changes to colors and then it can be the default :D

Have a nice weekend.

Daniel

Index.template.php
Search:
<script type="text/javascript">
$(document).ready(function(){
$("input[type=button]").attr("class", "btn btn-default btn-sm");
$(".button_submit").attr("class", "btn btn-primary btn-sm");
$("#advanced_search input[type=\'text\'], #search_term_input input[type=\'text\']").removeAttr("size");
$(".table_grid").attr("class", "table table-striped");
$("img[alt=\'', $txt['new'], '\'], img.new_posts").replaceWith("<span class=\'label label-warning\'>', $txt['new'], '</span>");
$("#profile_success").removeAttr("id").removeClass("windowbg").addClass("alert alert-success");
$("#profile_error").removeAttr("id").removeClass("windowbg").addClass("alert alert-danger");
});
</script>


Replace with:
<script type="text/javascript">
$(document).ready(function(){
var $abrir = $(".abrir");
var $cerrar = $(".cerrar");
var $menu = $("#sidebar");
var $content = $("#main");
$abrir.click( function(){
$menu.css("left","0px");
$cerrar.css("display","block");
$abrir.css("display","none");
$content.css("margin-left","300px");
});
$cerrar.click( function(){
$menu.css("left","-300px");
$cerrar.css("display","none");
$abrir.css("display","block");
$content.css("margin-left","auto");
});
$("input[type=button]").attr("class", "btn btn-default btn-sm");
$(".button_submit").attr("class", "btn btn-primary btn-sm");
$("#advanced_search input[type=\'text\'], #search_term_input input[type=\'text\']").removeAttr("size");
$(".table_grid").attr("class", "table table-striped");
$("img[alt=\'', $txt['new'], '\'], img.new_posts").replaceWith("<span class=\'label label-warning\'>', $txt['new'], '</span>");
$("#profile_success").removeAttr("id").removeClass("windowbg").addClass("alert alert-success");
$("#profile_error").removeAttr("id").removeClass("windowbg").addClass("alert alert-danger");
});
</script>


Search:
echo'
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="row">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand visible-xs" href="', $scripturl, '">', $context['forum_name'] ,'</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">';

// Show the menu here, according to the menu sub template.
template_menu();

echo'
</ul>
</div>
</div>
</div>
</nav>


Replace with:
// Show the menu here, according to the menu sub template.
template_menu();

echo'
<div id="main">
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div>
<div class="navbar-header">
<div class="btn-sidebar">
<a href="javascript:void(0);" class="abrir">
<button type="button" class="navbar-toggle" style="display: block">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</a>
<a href="javascript:void(0);" class="cerrar">
<button type="button" class="navbar-toggle" style="display: block">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</a>
</div>
<a class="navbar-brand" href="', $scripturl, '">', $context['forum_name'] ,'</a>
</div>
</div>
</div>
</nav>


Search:
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo '
</body></html>';
}

Replace with:
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo '
</div>
</body></html>';
}


Search:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li id="button_', $act, '" class="', $button['sub_buttons'] ? 'dropdown ' : '', '', $button['active_button'] ? 'active ' : '', '">
<a ', $button['sub_buttons'] ? 'class="dropdown-toggle" ' : '', 'href="', $button['sub_buttons'] ? '#' : $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '', $button['sub_buttons'] ? ' data-toggle="dropdown"' : '', '>
', $button['title'], '
', $button['sub_buttons'] ? '<span class="caret"></span>' : '' ,'
</a>';
if (!empty($button['sub_buttons']))
{
echo '
<ul class="dropdown-menu" role="menu">';

foreach ($button['sub_buttons'] as $childbutton)
{
echo '
<li>
<a href="', $childbutton['href'], '"', isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '>
', $childbutton['title'] , '
</a>
</li>';
}
echo '
</ul>';
}
echo '
</li>';
}
}


Replace with:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
<aside id="sidebar">
<ul class="nav nav-list">';

foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li id="button_', $act, '">
<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '#forum"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
</a>
</li>';
}

echo '
</ul>
</aside>';
}


Reseller.css
Add to the end:
aside#sidebar{
    background: #222;
    width: 300px;
    height: 100%;
    position: fixed;
    top: 0;
    left: -300px;
    transition: 0.2s;
    -webkit-transition: 0.2s;
}
#wrapper
{
    transition: 0.2s;
    -webkit-transition: 0.2s;
}
.btn-sidebar
{
float: left;
}
#sidebar > .nav li
{
border-top: 1px solid rgba(95, 95, 95, 0.1);
}
#sidebar > .nav li:last-child
{
border-bottom: 1px solid rgba(95, 95, 95, 0.1);
}
#sidebar > .nav > li a
{
color: #d2c0c4;
}
#sidebar > .nav > li a:hover
{
color: #3498db;
background-color: #1b1516;
}
#sidebar > .nav > li a.active
{
color: #3498db;
}
.cerrar{
    display: none;
}


Regards!

Porr

Works :D Looks  as a non SMF forum now ;D and thats a compliment. Just learning a lot by just looking at the code and changing small stuff. And breaking it sometimes hehe...

Greetings,

Porr

How did you prevent the horizantal scroll bar when opening the menu? I tried it with the general code in the index.css

/* This division wraps the entire forum when a forum width is set. */
div#wrapper
{
margin: 0 auto;
width: 90%;
margin-top: 40px;
margin-bottom: 40px;

Porr

Changed the way the menu reacts so now the forum does not changes horizantal. Perfect :D

bry82

Hi,
is it possible to remove the button "login" and "register" from the blue header?
thank you

bry82

Quote from: Daniel on September 06, 2014, 01:04:47 PM
2. I think doing the theme, I didn't put that code.
Search:
// Show the member's custom title, if they have one.
if (!empty($message['member']['title']))
echo '
<li class="title">', $message['member']['title'], '</li>';

Add after:
// Show the member's primary group (like 'Administrator') if they have one.
if (!empty($message['member']['group']))
echo '
<li class="membergroup">', $message['member']['group'], '</li>';

Search:
// Show the stars if they are not in a group.
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';

Add before:
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';



I'm trying to do the same. Can you tell me which file I need to edit? Thanks :)

bry82

Okay, I managed to find out what to edit, Display.template.php

Can I display an image instaed of "administrator", "moderator" etc...?

Daniel

Index.template.php (Themes/Reseller)
Search and delete:
else
{
echo'
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModal">', $txt['login'] ,'</button>
<button type="button" class="btn btn-primary" onclick="location.href=\''. $scripturl .'?action=register\'">', $txt['register'] ,'</button>
<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">', $txt['login'] ,'</h4>
</div>
<div class="modal-body">
<div class="form-group">
<input type="text" name="user" class="form-control" placeholder="', $txt['user'] ,'" />
</div>
<div class="form-group">
<input type="password" name="passwrd" class="form-control" placeholder="', $txt['password'] ,'" />
</div>
<div class="checkbox">
<label>
<input name="cookielength" type="checkbox" value="-1" /> ', $txt['rs_remember'] ,'
</label>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-success">', $txt['login'] ,'</button>
</div>
</div>
</div>
</div>
</form>';
}

bry82

Brilliant! Thank you!

bry82

Hi,
since switching to reseller theme, the newsfader disappeared.
Where should it appear?
Is it a feature of the theme?

Edit: solved. Sorry. :(
Last Edit: November 13, 2014, 06:55:13 AM by bry82

Guliberg

Buenas. Mi duda es, ¿cómo podría añadir nuevas fuentes (web fonts) al foro, agregadas en el BBCode?, como fuentes predeterminadas como Arial, Courier, etc.

Y la otra es... ¿cómo podría cambiar el diseño de la lista de páginas del fondo por cuadros, como en SMFTricks?, creo que es más cómodo tenerlo de esa manera para resoluciones en móviles, por que se hace difícil hacer click con el dedo a las pequeñas letras de las páginas; utilizo el theme Reseller.

Muchas gracias.

bry82

QuoteJust upload the images of the badges to  Themes/Reseller images and configure the ranges to display the badge.

I'd like to do this too. How do I configure the ranges? Thank you. ^_^

ForumMix

I was wondering how to increase pages on this theme. Today, there are many temor with this adaptation-Forum width:
Ange forum width. For example: 950px, 80%, 1240px.

But this is missing this. Now I wonder where this can be? Can anyone identify this?