Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all 685 articles
Browse latest View live

[YATT] - Yet another tab tutorial (with cookies)

$
0
0
1. Extract the content from archive.zip and move jquery.js (1.9) and jquery.cookie.js to jscripts folder in your forum root.

2. Go to AdminCP -> templates and styles -> templates -> <your current theme template set> -> Ungrouped Templates -> headerinclude and at the bottom paste:

Code:
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/jquery.js"></script>

<script type="text/javascript">jQuery.noConflict();</script>


<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/jquery.cookie.js"></script>


<script type="text/javascript">
jQuery(document).ready(function($){

if ($.cookie('active_index_tab') == 'tab_2') {
     $('#forum_tabs').removeClass('tab_1').addClass('tab_2');    
     } else if ($.cookie('active_index_tab') == 'tab_3') {
     $('#forum_tabs').removeClass('tab_1').addClass('tab_3');
      } else if ($.cookie('active_index_tab') == 'tab_4') {
     $('#forum_tabs').removeClass('tab_1').addClass('tab_4');    
      } else if ($.cookie('active_index_tab') == 'tab_5') {
     $('#forum_tabs').removeClass('tab_1').addClass('tab_5');    
        } else if ($.cookie('active_index_tab') == 'tab_6') {
     $('#forum_tabs').removeClass('tab_1').addClass('tab_6');    
     } else if ($.cookie('active_index_tab') == 'tab_7') {
     $('#forum_tabs').removeClass('tab_1').addClass('tab_7');    
      } else if ($.cookie('active_index_tab') == 'tab_8') {
     $('#forum_tabs').removeClass('tab_1').addClass('tab_8');    
     } else if ($.cookie('active_index_tab') == 'tab_9') {
     $('#forum_tabs').removeClass('tab_1').addClass('tab_9');    
     } else if ($.cookie('active_index_tab') == 'tab_10') {
     $('#forum_tabs').removeClass('tab_1').addClass('tab_10');
     }

$('#forum_tabs > .forum_tab_links > span > a').click(function(){
       var tab_id = $(this).attr('id');
       parent_class = $('#forum_tabs').attr("class");
       $('#forum_tabs > .forum_tab_links > span > a').removeClass('active'); // remove active class from all links
       $(this).addClass('active'); // add active class to clicked tab
       if ( $("#forum_tabs").hasClass(parent_class) ) {
       $("#forum_tabs").removeClass(parent_class).addClass(tab_id);
       } else {  $('#forum_tabs').addClass(tab_id); }
      $.cookie('active_index_tab',tab_id, {expires: 365});
});

});

</script>


3. In index templates index find {$forums} variable and replace it with

Code:
<div class="tab_1" id="forum_tabs">

<div class="forum_tab_links">
<span>
<a href="javascript:;" id="tab_1">First</a>
<a href="javascript:;" id="tab_2">Second</a>
<a href="javascript:;" id="tab_3">Third</a>
</span>
</div>

<div>
{$forums}
</div>


</div>



4. In Forum Bit Templates -> forumbit_depth1_cat at the beginning of template paste

Code:
<div id="tab_cat_{$forum['fid']}">

and at the bottom paste

Code:
</div>

and save it.

5. AdminCP -> templates and styles -> themes -> <your current forum theme> -> -> Add Stylesheet

File Name. tabs.css
Write my own content (select that option) and paste

Code:
#forum_tabs > .forum_tab_links {
     text-align:center;
     margin:7px auto;
     display:block;
}

#forum_tabs > .forum_tab_links > span {
     background-color: #003454;
     background-image: -webkit-gradient(linear, left top, left bottom, from(#026cb0), to(#03568a)); /* Saf4+, Chrome */
     background-image: -webkit-linear-gradient(top, #026cb0, #03568a); /* Chrome 10+, Saf5.1+ */
     background-image: -moz-linear-gradient(top, #026cb0, #03568a); /* FF3.6+ */
     background-image: -ms-linear-gradient(top, #026cb0, #03568a); /* IE10 */
     background-image: -o-linear-gradient(top, #026cb0, #03568a); /* Opera 11.10+ */
     background-image: linear-gradient(top, #026cb0, #03568a); /* W3C */
     display:inline-block;
     border-radius:3px;
     border:1px solid #003454;
}


#forum_tabs > .forum_tab_links > span > a {
     padding:4px 5px;
     font-size:11px;
     display:block;
     float:left;
     color:#f5f5f5;
     text-align:center;
     border-right: 1px solid #003454;
     text-decoration:none;    
}
#forum_tabs > .forum_tab_links > span > a:hover,
#forum_tabs > .forum_tab_links > span > a.active {
box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.449)!important;
}

#forum_tabs > .forum_tab_links > span > a:last-child {
     border-right:0 !important;
}


#forum_tabs  div[id^="tab_cat_"] {
  display:none; /*Hides tabs content*/
}



How to get tabs working ?

By default all tab content is hidden.When you click on a certain tab it will add a class to parent container (Example: first tab will add tab_1 class to parent container, second tab will add tab_2 class to parent container, ninth tab will add tab_9 class to parent container and so on).

Since the tab content is hidden you will need to add additional css to make certain forum categories visible after you click on certain tab.


EXAMPLE:

Code:
.tab_1 #tab_cat_1 {
  display:block !important;
}

.tab_3 #tab_cat_2,
.tab_3 #tab_cat_3 {
  display:block !important;
}


Description of this code:


Quote:.tab_1 marks the parent class that was added after you clicked on first tab link. #tab_cat_1 marks the forum category (with ID 1) that is displayed when parent class has tab_1 class (other forum categories are hidden).


.tab_3 marks the parent class that was added after you clicked on third tab link. #tab_cat_2 and #tab_cat_3 marks the forum categories (with ID 2 and 3) that are displayed when parent class has tab_3 class (other forum categories are hidden).


YOUR CODE:


Code:
.tab_x #tab_cat_y,
.tab_x #tab_cat_y {
  display:block !important;  /*if your tab content contains more then 1 category use this code*/
}

.tab_x #tab_cat_y {
  display:block !important;
}


x - marks the number of your clicked tab (first tab - 1, second tab - 2 and so on)
y- marks the id of forum category that is dislayed when you click on tab x (to find out the number of forum category in AdminCP -> Forums & Posts and hover on forum category:

admin/index.php?module=forum-management&fid=1 <- 1 is the id of first category in my example).

NOTE: tab_1 is the default class (all content under tab_1 will show as default if you don't have any cookie values related to index tabs).


NOTE: if you have css code for tab_1 content just replace 1 in tab_1 and add 0 (tab_0 is the default class).

How to add more tabs ?


NOTE: In this example there are three tabs
Code:
<a href="javascript:;" id="tab_1">First</a>
<a href="javascript:;" id="tab_2">Second</a>
<a href="javascript:;" id="tab_3">Third</a>

If you need more tabs after

Code:
<a href="javascript:;" id="tab_3">Third</a>

add

Code:
<a href="javascript:;" id="tab_4">tab text</a>

For each new tab change x in id="tab_x" to a number (5, 6, 7, 8, 9, 10 and so on), and change tab text to your desired one.


images:


[Image: jtIIi7o.png] [Image: ZrqakTj.png]

.zip  archive.zip (Size: 33.66 KB / Downloads: 7)

How to make an MP3 player

$
0
0
Hi. I come from Polish so poorly written English. So that i need MP3 player to your forum. It would be best if they play all the songs from a folder on FTP.

Thanks for any answers. Smile

Looking for an accurate tutorial to jQuery Collapsible

[jQuery] ToolTip MyBB

$
0
0
FIRST RESULT:
[Image: 2YI0w.png]

NOW INSTALATION:

Go to headerinclude and put inside it:
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="jscripts/jquery/jquery.tipTip.js"></script>
<script type="text/javascript" src="jscripts/jquery/jquery.tipTip.minified.js"></script>
<link rel="stylesheet" href="jscripts/jquery/tipTip.css" type="text/css">
<script type='text/javascript'>
jQuery.noConflict();
jQuery(function() {
jQuery("a").tipTip({maxWidth: "auto", edgeOffset: 10,gravity: 'n'});
jQuery("img").tipTip({maxWidth: "auto", edgeOffset: 10,gravity: 'n'});
  });
</script>

And now go to FTP and upload folder

\/


.zip  jscripts.zip (Size: 4.99 KB / Downloads: 2)

Any problems? write in comment Wink

Link Transferor Script V1.5 for MyBB

$
0
0
HiToungue
Today I want to share you a script that build your links transferor Like My FroumBig Grin
First, download the script and upload this to your forum's folder in your host.
Then follow the instruction:
1-find class_parser.php in inc'folder in your froum folder:
.../inc/class_parser.php
then find the following code in class_parser.php:
PHP Code:
$link "<a href=\"$fullurl\" target=\"_blank\"{$nofollow}>$name</a>"
and replace this to:
PHP Code:
if(strstr($fullurl,'yoursite.com')){
        
$link "<a href=\"http://yoursite.com/go/index.php?url=$fullurl\" target=\"_blank\"{$nofollow}>$name</a>";
        if(
strpos($fullurl,'yoursite.com')<=11){
        
$link "<a href=\"$fullurl\" target=\"_blank\"{$nofollow}>$name</a>";
        }
        }
        else {
        
$link "<a href=\"http://yoursite.com/go/index.php?url=$fullurl\" target=\"_blank\"{$nofollow}>$name</a>";
        } 

2-Replace All yoursite.com in above code with your forum Address.

Finally,It's all done.
You have a link transferor in your froum like www.vafa-forum.ir

Current Link transferor'script types available:
  • External links transferor
  • Internal links do not transfer
  • This version does not have bugs
  • and...

Features:
  • Produce a beautiful menu in footer
  • Produce a Address bar in header
  • Produce a bookmark links
  • & Even better performance...

Script's web page:
http://vafa-forum.ir/thread-234.html

and live Demo:
http://www.vafa-forum.ir/go/

Screen shots:

.png  Firefox20130605151955912.png (Size: 31.26 KB / Downloads: 30)
.jpg  Firefox20130605152112718.jpg (Size: 152.37 KB / Downloads: 28)

Download Link:

.zip  vafa-Link-Transfer-MyBB.zip (Size: 77.29 KB / Downloads: 2)

Good luckWinkCool

Secure your Admin CP (.htaccess)

$
0
0
Okay, this is an easy but effective way to secure your admin control panel.

How does this protect your admincp?

When you go to access your control panel you will be given the following Authentication Window:
[Image: authentication-required.jpg]

I have this enabled on my server. It just makes it a lot harder for hackers to gain unauthorized access to your AdminCP.

How do I create the required files?

You could make the two files yourself or you can use this easy tool to make the two files for you HERE!

Everything is explained on the tool page, but this does require .htaccess

Oh and it won't display this too you everytime you try to access the AdminCP, but it does it at random. If you are not authorized and haven't previously entered the correct credentials then this will always be displayed. Please either post back or PM me if you need any help.

[Tutorial] Read More Break bbcode

$
0
0
After spending many hours searching for an easy way to include a bbcode break for Announcement postings on the portal, I have found one that works really well.

The utilizes jquery. I have attached the files that I modified for my website. The originals can be found, here. The original version included "..." and cut off 100 characters after the break point. I removed the "..." and set the cut off at 0 characters.

1. Download these files and place them on your server. Mine are at /jscripts.

2. Modify Template -> Portal Templates -> Portal
Add the following code underneath {$headerinclude}
Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<script src="jscripts/jquery.expander.js"></script>
<script src="jscripts/jquery.expander.min.js"></script>

<script>
$(document).ready(function() {
  var opts = {collapseTimer: 4000};

  $.each(['beforeExpand', 'afterExpand', 'onCollapse'], function(i, callback) {
    opts[callback] = function(byUser) {
      var by, msg = '<div class="success">' + callback;

      if (callback == 'onCollapse') {
        msg += ' (' + (byUser ? 'user' : 'timer') + ')';
      }
      msg += '</div>';

      $(this).parent().parent().append(msg)
    }
  });

  $('dl.expander dd').eq(0).expander();
  $('dl.expander dd').slice(1).expander(opts);


  $('ul.expander li').expander({
    slicePoint: 0,
    widow: 2,
    expandSpeed: 0,
    userCollapseText: '[^]'
  });

  $('div.expander').expander();
});

</script>

3. Create bbcode
Go to Configuration -> MyCode -> Add New MyCode

Regular Expression:
Code:
\[readmore\](.*?)\[/readmore\]

Replacement Text:
Code:
<div class="expander">$1</div>

Now anything within the readmore tags will be hidden behind a readmore link on the portal page. Also, by only adding the scripts to the Portal page, your announcement thread will still look like normal.

A demo can be seen on my website at: http://www.amongshadows.com

.zip  jquery.expander.zip (Size: 6.55 KB / Downloads: 1)

Zoom MyBB forum to fit viewport on any resolution

$
0
0
So I designed my website and forum with 1024x768 in mind, some users complained that it's tiny because they ran 2xxx x whatever resolution (lol).

I run 1920x1200 myself on my laptop and 1080p on my computers other than office where I also run a ridiculously high resolution.

That being said, web stats reports that 1024x768 is still the defacto resolution being used worldwide up until now...

So the solution? Jquery!

Go into Ungrouped Templates>headerinclude and place this before {$stylesheets}:

Code:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
jQuery.noConflict();
</script>

Then under Header Templates>header add before anything else this:

Code:
<script type="text/javascript">
jQuery(window).load(function() {
    var currentWidth = jQuery(document.body).width();
    var targetWidth = 1050; // experiment for your self
    var scrollWidth = 10; // need to make it dynamic
    // if the screen is not bigger than the target, then don't mess with zooming
    if (currentWidth > targetWidth) {
      if (typeof document.body.style.zoom != "undefined")
        document.body.style.zoom = currentWidth / targetWidth;
      else if (typeof document.body.style.MozTransform != "undefined") {
        document.body.style.MozTransformOrigin = "left top";
        document.body.style.MozTransform = 'scale(' + currentWidth / targetWidth + ')';
      }
      else if (typeof document.body.style.WebkitTransform != "undefined")
        document.body.style.WebkitTransform = 'scale(' + currentWidth / targetWidth + ')';

      jQuery(document.body).width(targetWidth - scrollWidth);
   }
   });
</script>

No restrictions for Goolge Adsense bot while having few blocked urls in robots.txt

$
0
0
I was looking for some thing like this, as have few URL's blocked in robots.txt and the ads code is implemented from the header and footer blocks, so the Adsense bot used to give lot of crawler errors. Also google says, it may increase CTR and there by increasing the revenue. Here is the solution I found.

Code:
# allow adsense bot on entire site
User-agent: Mediapartners-Google*
Disallow:
Allow: /*

I thought this might useful for some one like me.

Source: here

Improve Your Forum: Creating Automated Backups (with pics!)

$
0
0
The main reason for writing the content on a Wordpress blog is so I can (more easily) commit to changes and edits if necessary.

A quick overview of this guide:
  • Good practice to backup your database every day.
  • Website's should be backed up as well but on less frequent basis (unless you are making core changes).

The article assumes you have:
  • A MyBB forum (images in the article concern backing up a MyBB database)
  • Perl enabled.
  • Able to create cron jobs
  • Access to cPanel
  • FTP client

This is part of an on-going series of tutorials I'm working on to educate new forum admins and increase the quality of new MyBB powered communities.

There are people not using MyBB to it's fullest potential and it's something I would like to do to share what I know/learned while operating and administrating a "big" forum.

More articles will come soon Cool

[Tutorial] MyBB Pop Up Windows - Reply (Quote Button)

$
0
0
Instead of using Quick Reply form under the SHOWTHREAD page, this is alternative nice way to reply through QUOTE BUTTON.

Background:
- mostly smartphone user doesn't like refresh or opening new tab behavior
- full NEWREPLY interface load too many stuff for smartphone, such smiley/codebutton/attachment etc..

How it work:
- replacing default quote (reply) button to popup windows (reply)
- minimizing and removing unnecessary stuff on full-reply
- after post submitted, the popup reply form will closed and the previous parent windows will refreshed automatically


.jpg  screenshot.jpg (Size: 124.22 KB / Downloads: 27)

Limitation:
- Doesn't work if your forum directory is SubDomain.
- Still working though, but it displaying error cannot find "javascript:window.close()" page
- I dont know how to solve this, yet Smile

Implementation:
- need small core modification (newreply.php) to catch quote input and ignore normal NEWREPLY
- modifying 2 templates (showthread, postbit_quote)
- adding 1 template (newreply_quote) as "minimize version of full reply"

Codes:
1. Look at Post Bit Templates - postbit_quote
And replace whole code with this,
PHP Code:
<a href="newreply.php?tid={$tid}&amp;replyto={$post['pid']}onclick="centeredPopup(this.href,'myWindow','520','330','yes');return false"><img src="{$theme['imglangdir']}/postbit_quote.gif" alt="{$lang->postbit_quote}title="{$lang->postbit_quote}/></a

2. Look at Show Thread Templates - showthread
And add this after {$headerinclude}
PHP Code:
<script language="javascript">
var 
popupWindow null;
function 
centeredPopup(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/0;
TopPosition = (screen.height) ? (screen.height-h)/0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
popupWindow window.open(url,winName,settings)
}
</script> 

3. Add new template, and give it name: newreply_quote
and fill the template set below:
PHP Code:
<html>
<
head>
<
title>{$lang->post_reply_to}</title>
{
$headerinclude}

<
script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
</head>
<body onunload="window.opener.location.reload();">

{$reply_errors}

<form action="newreply.php?tid={$tid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">

{$checkboxvalidation}
<tr>
<td class="trow2">
<textarea id="message" name="message" rows="12" cols="70" tabindex="2" >{$message}</textarea>
</td>
</tr>
{$captcha}
<tr><td class="trow2">

<div align="left">
<input type="submit" class="button" name="submit" value="{$lang->post_reply}" tabindex="3" accesskey="s" />
<input type="hidden" name="action" value="do_newreply" />
<input type="hidden" name="replyto" value="{$replyto}" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
<input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
<input type="hidden" name="tid" value="{$tid}" />
</form>

<form action="javascript:window.close();">
<input type="hidden" />
<input type="submit" value="Cancel" />
</form>

</div>
</td></tr>
</table>

</body>
</html> 

4. Modifying core file "NEWREPLY.PHP" - please read carefully
- find
Code:
$url = get_post_link($pid, $tid)."#pid{$pid}";

and replace with this
Code:
$url = "javascript:window.close()";

- find another
Code:
$newreply_template = $templates->get("newreply");
and add this under
Code:
$newreply_quote_template = $templates->get("newreply_quote");

- finally find the last
Code:
eval("\$newreply = \"".$newreply_template."\";");
and replace with this
Code:
if($replyto)
        {
            $quoted_posts[$replyto] = $replyto;
        eval("\$newreply = \"".$newreply_quote_template."\";");        
        }
        else
        {
        eval("\$newreply = \"".$newreply_template."\";");
        }

Save and done!!

Or you can use attachment below, to replace existing NEWREPLY.PHP file (version 1.6.10)

Demo link here
Use this demo account:
username: usertest
password: usertest


Then dont forget to press [Image: postbit_quote.gif] button to test Wink
In the future, you may use this as plugin or mod

.php  newreply.php (Size: 38.02 KB / Downloads: 3)

Motion colorful (5 colors) usernames

$
0
0
I will be showing you how to make a specific group have motion colorful ( 5 colors ) usernames.
First of all see movies ( english_name.zip ) in one file in attachment , if interesting for you:

1- Go to Admin Control Panel >>> Templates >>> Ungrouped Templates >>> headerinclude >>>
before

PHP Code:
{$stylesheets

add the following code in it .

PHP Code:
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/cycling_midori.js"></script> 

2. Next this is to give a specific group a rainbow name.
Go to Admin Control Panel >>> Users & Groups >>>Groups >>> your aim group >>>Option>>Edit user group>>Username Style -----> And insert :

PHP Code:
<span id="rainbow" class="bold"><script type="text/javascript">rainbownameload('rainbow' '{username}');</script></span> 

3. Upload " cycling_midori.js" into your "jscripts" file in root .

Now whatever group you picked will now have a motion colorful ( 5 colors ) username . Big Grin

.zip  english_name.zip (Size: 360.36 KB / Downloads: 7)

.zip  cycling_midori.zip (Size: 9.02 KB / Downloads: 2)

Accept Cookies Tutorial

$
0
0
So this is a quick and simple tutorial on how to add an accept cookies bubble to display in your footer:
[Image: 10fc552.png]

How to install:

1. Go to AdminCP --> Templates & Style --> Your Style's Templates --> Footer Templates --> Footer
2. At the very end of the footer template add:
PHP Code:
<link rel="stylesheet" type="text/css" href="http://yoursitehere.com/cookies-accept/main.css"/>
<
script type="text/javascript" src="http://yoursitehere.com/cookies-accept/support-opt-in.js"></script>
<script type="text/javascript" src="http://yoursitehere.com/cookies-accept/require-opt-in.js" read_more="http://www.yoursitehere.com/privacy-policy"></script> 

Then upload the folder cookies-accept to your server.

Edit the links to wherever the folder or contents are located on your server.

.zip  cookies-accept.zip (Size: 10.07 KB / Downloads: 7)

Make your forum's speed seem faster

$
0
0
Hi,

What it does: It lets your members and your visitors feel that your site or forum is very fast when they access it. It is just like a trick only it does speed up your forum.

For more info on how this works go here.

How to install?

1. Go to AdminCP --> Templates & Style --> Your Style's Templates --> Header Templates --> Header
2. At the very top of the header template above everything else put this:
PHP Code:
<meta http-equiv="Page-Exit" content="BlendTrans(Duration=0)" />
<
meta http-equiv="Page-Enter" content="BlendTrans(Duration=0)" /> 
3. Save & Enjoy Smile

Pre Load your forum

$
0
0
Hi,

This little mod pre-loads the forum before even actual showing you the forum, it loads all the contents such as images, css, etc.

Put this code at the bottom of your forums headerinclude template:
PHP Code:
<SCRIPT LANGUAGE="JavaScript">

<!-- 
Begin
function loadImages() {
if (
document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility 'hidden';
}
else {
if (
document.layers) {  // Netscape 4
document.hidepage.visibility 'hidden';
}
else {  
// IE 4
document.all.hidepage.style.visibility 'hidden';
      }
   }
}
//  End -->
</script>
</head>
<BODY OnLoad="loadImages()" style="overflow-x: hidden;">
<div id="hidepage" style="position: absolute; left:0px; top:0px; background-color: #FFFFFF; layer-background-color: #FFFFFF; height: 100%; width: 100%;"><table width="100%" height="100%"><tr><td valign="middle" align="center">Forum Content Loading... Please wait.</td></tr></table></div> 
Enjoy Smile

Dismiss Moderator Notice

$
0
0
Purpose:
Add a dismiss button in Moderator Notice : Report Alert same as default PM notice has which will make the notice hidden once dismissed until a new report occurs.

Dependency:
1. jQuery Library
2. jQuery Cookie Plugin

Method:
1. Go to your headerinclude template and include the jQuery library (if not already included) and jQuery Cookie plugin. find the code {$stylesheets} and add the following just before that:

Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='http://demonate.net/CDN/Library/jquery-1.8.2.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="http://demonate.net/CDN/Library/jquery.cookie.js"></script>

2. Now in the same template (headerinclude) find this line:
Code:
{$newpmmsg}

add just before that:
Code:
<script type="text/javascript">
jQuery(document).ready(function(){

    // Hide the notice if already dismissed; based on cookie value
    if (jQuery.cookie("report_notice") == "{$reported['unread']}") { jQuery("#report_notice").hide();}

    // Define the function of dismiss button
    jQuery('#dismiss').click(function() {
        dsms_trgt = jQuery(this).parent().parent().attr("id");
        dsms_val = jQuery(this).parent().parent().attr("count");
        jQuery.cookie(dsms_trgt, dsms_val, { expires: 365 });
        jQuery(this).parent().parent().hide();
        return false;
    });

});
</script>

Save the modified 'headerinclude'.

3. Now, go to Global Templates > global_unreadreports and add the blue bold texts just as shown below (or, simply replace the entire content with the following code chunk):

<div class="red_alert" id="report_notice" count="{$reported['unread']}"><div class="float_right"><a href="#" id="dismiss" title="{$lang->dismiss_notice}"><img src="{$theme['imgdir']}/dismiss_notice.gif" alt="{$lang->dismiss_notice}" /></a></div><a href="modcp.php?action=reports">{$lang->unread_reports}</a></div>
<br />

Save the template.

Congratz!!! You have successfully enabled dismiss button for Moderator Notice. Big Grin

[Image: CHen36S.png]

Happy coding ...

Task Running Problem Soloution

$
0
0
As you know, tasks will run using a virtual image in the footer template.
Sometimes, Some browsers, cache the task image and the tasks (or some of them) will not run!
The below simple plugin will solve this problem.
First of all, check that the following code exists in your footer template:
Code:
<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE -->{$task_image}<!-- End task image code -->

If it doesn't exist, add it to footer template like this:(Mybb default footer template)
Code:
<br />
            <div class="bottommenu">
                <div class="float_left">{$lang_select}</div>
                <div>
                    <span class="smalltext"><a href="{$mybb->settings['contactlink']}">{$lang->bottomlinks_contactus}</a> | <a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a> | <a href="#top">{$lang->bottomlinks_returntop}</a> | <a href="#content">{$lang->bottomlinks_returncontent}</a> | <a href="<archive_url>">{$lang->bottomlinks_litemode}</a> | <a href="{$mybb->settings['bburl']}/misc.php?action=syndication">{$lang->bottomlinks_syndication}</a></span>
                </div>
            </div>
            </div>
        <hr class="hidden" />
            <div id="copyright">
                <div id="debug"><debugstuff></div>
                <!-- MyBB is free software developed and maintained by a volunteer community.
                     It would be much appreciated by the MyBB Group if you left the full copyright and "powered by" notice intact,
                     to show your support for MyBB.  If you choose to remove or modify the copyright below,
                     you may be refused support on the MyBB Community Forums.
                    
                     This is free software, support us and we'll support you. -->
{$lang->powered_by} <a href="http://mybb.com/" target="_blank">MyBB{$mybbversion}</a>, &copy; 2002-{$copy_year} <a href="http://mybb.com/" target="_blank">MyBB Group</a>.<br />
Theme Translation by <a href="http://www.mybbiran.com" target="_blank">MyBBIran.com</a><br /><!-- End powered by -->

<br class="clear" />
<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE -->{$task_image}<!-- End task image code -->
{$auto_dst_detection}
        </div>
        </div>

if the above code exists in your footer template and still your tasks will not run or some of them won't run, install the following plugin. It may solve your problem.
Place it in inc/plugins

.php  task_optimizer.php (Size: 1.01 KB / Downloads: 9)

Making Your Post Colorful

$
0
0
Holla.. Today i want to share with mybb user how to make your post colorful.

method 1

Visit this website


Follow the instruction and paste the code.

[Image: 111.png]

Solutions for Missing Mycode Editor

$
0
0
Many MyBB software users report their MyBB editor is missing due to various reasons which I'll cover in this tutorial.
Before we start, we need to be sure that the MyBB editor is actually enabled on your account and for the entire
board.

To enable mycode editor for entire board: Go to ACP>Configuration>Settings>Clickable Smilies and BB Code>Clickable MyCode Editor>Tick ON

If the above setting is on but you still can't see the mycode editor but everyone else can then most likely you don't have it enabled through your UserCP.

Go to UserCP>Edit Options>Other Options>Tick Show the MyCode formatting options on the posting pages.

Now if you have both the above settings enabled and you still can't see the mycode editor then you are most likely missing something. Below I'm going to present some solutions in order of most likely the cause of the issue.

Solution # 1

Skip this solution if you are not using Cloudflare.

  • Log in to your Cloudflare
  • Edit Settings
  • Click on Performance tab
  • Disable Rocket Loader and/or Auto Minify

Solution # 2


Go to ACP>Templates & Styles>Themes>YOUR THEME>Editor Style>Change it to Office 2007

If this solution works then it means that there's a problem with your editor theme files.

Solution # 3

Reupload jscripts_themes folder in .jscripts/jscripts_themes and make sure you have a file called editor.js in .jscripts

Solution # 4

Download a fresh copy of MyBB from MyBB Downloads

Then reupload the codebuttons folder in .images and .images/themes.

Solution # 5

Go to ACP>Templates & Styles>Templates>YOUR THEME>Newthread
And
Go to ACP>Templates & Styles>Templates>YOUR THEME>Newreply

Make sure you have the following code:

Code:
{codebuttons}

Right after

Code:
<textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>

Solution # 6

This solution is only valid if the editor went missing after you upgraded or downgraded your forum.

Find updated templates for your current theme and revert them to original.

Go to ACP>Templates & Styles>Templates>Find Updated Templates

Solution # 6
Thanks to Effone

Go to ACP>Templates & Styles>Templates>YOUR THEME>Ungrouped Templates>Headerinclude

Add the following at the very end of your headerinclude template:

Code:
<script type="text/javascript">jQuery.noConflict();</script>

Hope you liked my guide. If you are still facing an issue then feel free to post below. I would appreciate all kinds of feedback on this guide.

[Req] Change Title tag

$
0
0
hi guys

can someone tell me how to change the title tag example

<img src="/images/file.png title="Hello">

its will appear hello every time you head the mouse to the image

i can see a lot of mybb forum with awesome title, how to make it awesome?
or make it with cool style bubbles or images like that
Viewing all 685 articles
Browse latest View live