Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Daniel

:
91
Soporte Themes y Mods SMF Tricks / Re: Duda sobre fuentes y CSS.
« on: November 21, 2014, 12:09:39 AM »
Subs.php (Carpeta Sources)
Buscar:
Code: [Select]
function constructPageIndex($base_url, &$start, $max_value, $num_per_page, $flexible_start = false)
{
global $modSettings;

// Save whether $start was less than 0 or not.
$start = (int) $start;
$start_invalid = $start < 0;

// Make sure $start is a proper variable - not less than 0.
if ($start_invalid)
$start = 0;
// Not greater than the upper bound.
elseif ($start >= $max_value)
$start = max(0, (int) $max_value - (((int) $max_value % (int) $num_per_page) == 0 ? $num_per_page : ((int) $max_value % (int) $num_per_page)));
// And it has to be a multiple of $num_per_page!
else
$start = max(0, (int) $start - ((int) $start % (int) $num_per_page));

// Wireless will need the protocol on the URL somewhere.
if (WIRELESS)
$base_url .= ';' . WIRELESS_PROTOCOL;

$base_link = '<a class="navPages" href="' . ($flexible_start ? $base_url : strtr($base_url, array('%' => '%%')) . ';start=%1$d') . '">%2$s</a> ';

// Compact pages is off or on?
if (empty($modSettings['compactTopicPagesEnable']))
{
// Show the left arrow.
$pageindex = $start == 0 ? ' ' : sprintf($base_link, $start - $num_per_page, '&#171;');

// Show all the pages.
$display_page = 1;
for ($counter = 0; $counter < $max_value; $counter += $num_per_page)
$pageindex .= $start == $counter && !$start_invalid ? '<strong>' . $display_page++ . '</strong> ' : sprintf($base_link, $counter, $display_page++);

// Show the right arrow.
$display_page = ($start + $num_per_page) > $max_value ? $max_value : ($start + $num_per_page);
if ($start != $counter - $max_value && !$start_invalid)
$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link, $display_page, '&#187;');
}
else
{
// If they didn't enter an odd value, pretend they did.
$PageContiguous = (int) ($modSettings['compactTopicPagesContiguous'] - ($modSettings['compactTopicPagesContiguous'] % 2)) / 2;

// Show the first page. (>1< ... 6 7 [8] 9 10 ... 15)
if ($start > $num_per_page * $PageContiguous)
$pageindex = sprintf($base_link, 0, '1');
else
$pageindex = '';

// Show the ... after the first page.  (1 >...< 6 7 [8] 9 10 ... 15)
if ($start > $num_per_page * ($PageContiguous + 1))
$pageindex .= '<span style="font-weight: bold;" onclick="' . htmlspecialchars('expandPages(this, ' . JavaScriptEscape(($flexible_start ? $base_url : strtr($base_url, array('%' => '%%')) . ';start=%1$d')) . ', ' . $num_per_page . ', ' . ($start - $num_per_page * $PageContiguous) . ', ' . $num_per_page . ');') . '" onmouseover="this.style.cursor = \'pointer\';"> ... </span>';

// Show the pages before the current one. (1 ... >6 7< [8] 9 10 ... 15)
for ($nCont = $PageContiguous; $nCont >= 1; $nCont--)
if ($start >= $num_per_page * $nCont)
{
$tmpStart = $start - $num_per_page * $nCont;
$pageindex.= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
}

// Show the current page. (1 ... 6 7 >[8]< 9 10 ... 15)
if (!$start_invalid)
$pageindex .= '[<strong>' . ($start / $num_per_page + 1) . '</strong>] ';
else
$pageindex .= sprintf($base_link, $start, $start / $num_per_page + 1);

// Show the pages after the current one... (1 ... 6 7 [8] >9 10< ... 15)
$tmpMaxPages = (int) (($max_value - 1) / $num_per_page) * $num_per_page;
for ($nCont = 1; $nCont <= $PageContiguous; $nCont++)
if ($start + $num_per_page * $nCont <= $tmpMaxPages)
{
$tmpStart = $start + $num_per_page * $nCont;
$pageindex .= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
}

// Show the '...' part near the end. (1 ... 6 7 [8] 9 10 >...< 15)
if ($start + $num_per_page * ($PageContiguous + 1) < $tmpMaxPages)
$pageindex .= '<span style="font-weight: bold;" onclick="expandPages(this, \'' . ($flexible_start ? strtr($base_url, array('\'' => '\\\'')) : strtr($base_url, array('%' => '%%', '\'' => '\\\'')) . ';start=%1$d') . '\', ' . ($start + $num_per_page * ($PageContiguous + 1)) . ', ' . $tmpMaxPages . ', ' . $num_per_page . ');" onmouseover="this.style.cursor=\'pointer\';"> ... </span>';

// Show the last number in the list. (1 ... 6 7 [8] 9 10 ... >15<)
if ($start + $num_per_page * $PageContiguous < $tmpMaxPages)
$pageindex .= sprintf($base_link, $tmpMaxPages, $tmpMaxPages / $num_per_page + 1);
}

return $pageindex;
}

Reemplazar por:
Code: [Select]
function constructPageIndex($base_url, &$start, $max_value, $num_per_page, $flexible_start = false)
{
global $modSettings;

// Save whether $start was less than 0 or not.
$start = (int) $start;
$start_invalid = $start < 0;

// Make sure $start is a proper variable - not less than 0.
if ($start_invalid)
$start = 0;
// Not greater than the upper bound.
elseif ($start >= $max_value)
$start = max(0, (int) $max_value - (((int) $max_value % (int) $num_per_page) == 0 ? $num_per_page : ((int) $max_value % (int) $num_per_page)));
// And it has to be a multiple of $num_per_page!
else
$start = max(0, (int) $start - ((int) $start % (int) $num_per_page));

// Wireless will need the protocol on the URL somewhere.
if (WIRELESS)
$base_url .= ';' . WIRELESS_PROTOCOL;

$base_link = '<li><a class="navPages" href="' . ($flexible_start ? $base_url : strtr($base_url, array('%' => '%%')) . ';start=%1$d') . '">%2$s</a></li>';

// Compact pages is off or on?
if (empty($modSettings['compactTopicPagesEnable']))
{
// Show the left arrow.
$pageindex = $start == 0 ? ' ' : sprintf($base_link, $start - $num_per_page, '&#171;');

// Show all the pages.
$display_page = 1;
for ($counter = 0; $counter < $max_value; $counter += $num_per_page)
$pageindex .= $start == $counter && !$start_invalid ? '<li class="active"><a href="javascript:void(0);">' . $display_page++ . '</a></li>' : sprintf($base_link, $counter, $display_page++);

// Show the right arrow.
$display_page = ($start + $num_per_page) > $max_value ? $max_value : ($start + $num_per_page);
if ($start != $counter - $max_value && !$start_invalid)
$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link, $display_page, '&#187;');
}
else
{
// If they didn't enter an odd value, pretend they did.
$PageContiguous = (int) ($modSettings['compactTopicPagesContiguous'] - ($modSettings['compactTopicPagesContiguous'] % 2)) / 2;

// Show the first page. (>1< ... 6 7 [8] 9 10 ... 15)
if ($start > $num_per_page * $PageContiguous)
{
$pageindex = $start == 0 ? ' ' : sprintf($base_link, $start - $num_per_page, '&#171;');
$pageindex .= sprintf($base_link, 0, '1');
}
else
{
$pageindex = $start == 0 ? ' ' : sprintf($base_link, $start - $num_per_page, '&#171;');
}

// Show the ... after the first page.  (1 >...< 6 7 [8] 9 10 ... 15)
if ($start > $num_per_page * ($PageContiguous + 1))
$pageindex .= '<li><span style="font-weight: bold;" onclick="' . htmlspecialchars('expandPages(this, ' . JavaScriptEscape(($flexible_start ? $base_url : strtr($base_url, array('%' => '%%')) . ';start=%1$d')) . ', ' . $num_per_page . ', ' . ($start - $num_per_page * $PageContiguous) . ', ' . $num_per_page . ');') . '" onmouseover="this.style.cursor = \'pointer\';"> ... </span></li>';

// Show the pages before the current one. (1 ... >6 7< [8] 9 10 ... 15)
for ($nCont = $PageContiguous; $nCont >= 1; $nCont--)
if ($start >= $num_per_page * $nCont)
{
$tmpStart = $start - $num_per_page * $nCont;
$pageindex.= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
}

// Show the current page. (1 ... 6 7 >[8]< 9 10 ... 15)
if (!$start_invalid)
$pageindex .= '<li class="active"><a href="javascript:void(0);">' . ($start / $num_per_page + 1) . '</a></li> ';
else
$pageindex .= sprintf($base_link, $start, $start / $num_per_page + 1);

// Show the pages after the current one... (1 ... 6 7 [8] >9 10< ... 15)
$tmpMaxPages = (int) (($max_value - 1) / $num_per_page) * $num_per_page;
for ($nCont = 1; $nCont <= $PageContiguous; $nCont++)
if ($start + $num_per_page * $nCont <= $tmpMaxPages)
{
$tmpStart = $start + $num_per_page * $nCont;
$pageindex .= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
}

// Show the '...' part near the end. (1 ... 6 7 [8] 9 10 >...< 15)
if ($start + $num_per_page * ($PageContiguous + 1) < $tmpMaxPages)
$pageindex .= '<li><span style="font-weight: bold;" onclick="expandPages(this, \'' .($flexible_start ? strtr($base_url, array('\'' => '\\\'')) : strtr($base_url, array('%' => '%%', '\'' => '\\\'')) . ';start=%1$d') . '\', ' . ($start + $num_per_page * ($PageContiguous + 1)) . ', ' . $tmpMaxPages . ', ' . $num_per_page . ');" onmouseover="this.style.cursor=\'pointer\';"> ... </span></li>';

// Show the last number in the list. (1 ... 6 7 [8] 9 10 ... >15<)
if ($start + $num_per_page * $PageContiguous < $tmpMaxPages)
$pageindex .= sprintf($base_link, $tmpMaxPages, $tmpMaxPages / $num_per_page + 1);

for ($counter = 0; $counter < $max_value; $counter += $num_per_page)
$display_page = ($start + $num_per_page) > $max_value ? $max_value : ($start + $num_per_page);
if ($start != $counter - $max_value && !$start_invalid)
$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link, $display_page, '&#187;');

}

return '<ul class="pagination">'.$pageindex.'</ul>';
}

Display.template.php y MessageIndex.template.php (Themes/tutheme)
Buscar y eliminar todos los:
Code: [Select]
', $txt['pages'], ':

92
Look in the languages folder of the theme. You can find files called ""ThemeStrings" and you can change what you want.

93
Reception / Re: Hello everyone
« on: November 20, 2014, 11:54:27 PM »
Welcome :)

94
There is no option in the administration to change the width of the forum. If you want, you can do the following:
Bootstrap.css (Themes/Reseller/css)
Search:
Code: [Select]
.container {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 768px) {
  .container {
    width: 750px;
  }
}
@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}
@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}
Replace with:
Code: [Select]
.container {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 768px) {
  .container {
    width: 90%;
  }
}
width: 90%; < There you can change de width of the forum.

95
Soporte Themes y Mods SMF Tricks / Re: Duda sobre fuentes y CSS.
« on: November 15, 2014, 01:44:39 PM »
En realidad, no se mucho sobre como agregar fuentes en los BBC, pero puedes mirar este mod: http://custom.simplemachines.org/mods/index.php?mod=3478

A que te refieres con lo del diseño de la lista de páginas del fondo por cuadros?

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

Can I display an image instaed of "administrator", "moderator" etc...?
You have to edit in the administration group member, there you will find how to setup the images. Remember that images should be in the following path: Themes/{yourtheme}/images

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?
Open another topic for this question.

97
Index.template.php (Themes/Reseller)
Search and delete:
Code: [Select]
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>';
}

99
Index.template.php
Search:
Code: [Select]
<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:
Code: [Select]
<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:
Code: [Select]
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:
Code: [Select]
// 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:
Code: [Select]
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo '
</body></html>';
}
Replace with:
Code: [Select]
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

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

Search:
Code: [Select]
// 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:
Code: [Select]
// 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:
Code: [Select]
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!

100
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:
Code: [Select]
<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'

101
1. Search:
Code: [Select]
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>Replace with:
Code: [Select]
<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'

2. Search:
Code: [Select]
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">
    +
  </button>

And change + for the word what you want.

3. When I have a little more of time, I will let the tutorial.

102
Los divs deben ir antes del ';, quedaria asi:
Code: [Select]
<a id="lastPost"></a>
<div class="fondo">';
// Show the page index... "Pages: [1]".
...
Code: [Select]
<input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />

</div>';
if ($context['show_spellchecking'])
Saludos!

103
Presales / Re: Namex/ZGames theme question
« on: October 21, 2014, 02:29:16 PM »
In the admin you have the options to change the background images, I recommend that the images have a 1920px of width and for the height that you want. They alone would fit the different screen resolutions.

Yes, we can add a custom border and create these sub menus.

It wouldn't be very difficult, you can install this mod: http://custom.simplemachines.org/mods/index.php?mod=3787, and then accomodate it.

104
Presales / Re: Namex/ZGames theme question
« on: October 18, 2014, 12:45:56 PM »
Namex handles it like everyone else. If you want to do the background responsive, you have to make min 3 background images for different screen resolutions. Namex has already a green color similar to zGames, look here: http://i.imgur.com/sVh71zV.png

As much as ZGames and NAMEX has an extra menu above the header, but this extra menu don't have submenu.

Yes, it is possible add a login like Reseller.

Yes, you can add a button and moves with the picture in the slideshow.

zGames don't have a footermenu, only a option to add your own copyright.

Namex is not responsive, as well, this will not fit on mobiles versions in change zGame is responsive, and will fit on mobile versions.

Regards!

: