Showing posts with label IP.Board Tutorials. Show all posts
Showing posts with label IP.Board Tutorials. Show all posts

Friday, April 3, 2015

How to Remove "License Key Missing" Warning in ACP New Tutorial 2015

How to Remove "License Key Missing" Warning in ACP New Tutorial 2015, please check and follow...


Go to admin -> skin_cp -> cp_skin_global.php and find:

if( !$this->settings['ipb_reg_number'] )
{
                                $this->lang->words['license_missing_info']              = sprintf( $this->lang->words['license_missing_info'], $this->settings['base_url'] . 'app=core&module=tools&section=licensekey' );
                                $extra_class = 'force_license';
                                $license_html = <<<HTML
                                                                <div id='license_notice_force'>
                                                                                                <h4>{$this->lang->words['license_missing_header']}</h4>
                                                                                                <p>{$this->lang->words['license_missing_info']}</p>
                                                                </div>
HTML;
}
else
{
                                $licenseData    = $this->cache->getCache( 'licenseData' );
                                if( ( !$licenseData OR !$licenseData['key']['_expires'] OR $licenseData['key']['_expires'] < IPS_UNIX_TIME_NOW and $licenseData['key']['_expires'] != -1 ) AND !IPSCookie::get( 'ignore-license-notice' ) )
                                {
                                                                $extra_class = 'expired_license';
                                                                $license_html = <<<HTML
                                                                                                <div id='license_notice_expired'>
                                                                                                                                <div class='right'><a id='license-close' href='#'>Close</a></div>
                                                                                                                                <h4>{$this->lang->words['license_expired_header']}</h4>
                                                                                                                                <p>{$this->lang->words['license_expired_info']}</p>
                                                                                                </div>
HTML;
                                }
}

 and replace it with this:


/*
if( !$this->settings['ipb_reg_number'] )
{
                                $this->lang->words['license_missing_info']              = sprintf( $this->lang->words['license_missing_info'], $this->settings['base_url'] . 'app=core&module=tools&section=licensekey' );
                                $extra_class = 'force_license';
                                $license_html = <<<HTML
                                                                <div id='license_notice_force'>
                                                                                                <h4>{$this->lang->words['license_missing_header']}</h4>
                                                                                                <p>{$this->lang->words['license_missing_info']}</p>
                                                                </div>
HTML;
}
else
{
                                $licenseData    = $this->cache->getCache( 'licenseData' );
                                if( ( !$licenseData OR !$licenseData['key']['_expires'] OR $licenseData['key']['_expires'] < IPS_UNIX_TIME_NOW and $licenseData['key']['_expires'] != -1 ) AND !IPSCookie::get( 'ignore-license-notice' ) )
                                {
                                                                $extra_class = 'expired_license';
                                                                $license_html = <<<HTML
                                                                                                <div id='license_notice_expired'>
                                                                                                                                <div class='right'><a id='license-close' href='#'>Close</a></div>
                                                                                                                                <h4>{$this->lang->words['license_expired_header']}</h4>
                                                                                                                                <p>{$this->lang->words['license_expired_info']}</p>
                                                                                                </div>
HTML;
                                }
}
*/


 Save and go to admin -> applications -> core -> [b]extensions -> dashboardNotifications.php and find:


if( ! $this->settings['ipb_reg_number'] )
  {
   $entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&section=licensekey" ) );
  }
  else
  {
   /* Is the Spam Service Working?
   if ( $this->settings['spam_service_enabled'] )
   {
                $GOT_SPAM_ERROR = false;
                /* Are we entitled to it?
                $licenseData = $this->cache->getCache( 'licenseData' );
                if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
                {
                 foreach ( $licenseData['ipbMain'] as $data )
                 {
                  if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] != 'Ok' )
                  {
                   $disableLink = $this->settings['base_url'] . "app=core&module=settings&section=settings&do=findsetting&key=spamservice";
                   if ( is_numeric( $data['_expires'] ) && time() > $data['_expires'] )
                   {
                                $entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_expired'], $disableLink ) );
                   }
                   else
                   {
                                $entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_unavailable'], $disableLink ) );
                   }
                   $GOT_SPAM_ERROR = true;
                   break;
                  }
                 }
                }
                if ( ! $GOT_SPAM_ERROR )
                {
                 /* Get last 5 logs, and if all 5 are errors, show message
                 $_errors = 0;
                 $_entries = 0;
                 $_lastError = '';
                 $this->DB->build( array( 'select' => 'log_code, log_msg', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 5 ) );
                 $this->DB->execute();
                 while( $_r = $this->DB->fetch() )
                 {
                  $_entries++;
                  if( $_r['log_code'] === '0' )
                  {
                   $_errors++;
                   if( !$_lastError )
                   {
                                $_lastError = $_r['log_msg'];
                   }
                  }
                 }
                 if( $_entries > 0 && $_errors == $_entries )
                 {
                  $entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_error_msg'], $_lastError ) );
                 }
                }
   }
   /* If it's disabled, are we entitiled to it?
   else
   {
                $licenseData = $this->cache->getCache( 'licenseData' );
                if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
                {
                 foreach ( $licenseData['ipbMain'] as $data )
                 {
                  if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] == 'Ok' )
                  {
                   $entries[] = array( $this->lang->words['spam_service_disabled'], $this->lang->words['spam_service_disabled_msg'] );
                   break;
                  }
                 }
                }
   }
  }
 and replace with this:


/* if( ! $this->settings['ipb_reg_number'] )
  {
   $entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&section=licensekey" ) );
  }
  else
  {
   /* Is the Spam Service Working?
   if ( $this->settings['spam_service_enabled'] )
   {
                $GOT_SPAM_ERROR = false;
                /* Are we entitled to it?
                $licenseData = $this->cache->getCache( 'licenseData' );
                if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
                {
                 foreach ( $licenseData['ipbMain'] as $data )
                 {
                  if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] != 'Ok' )
                  {
                   $disableLink = $this->settings['base_url'] . "app=core&module=settings&section=settings&do=findsetting&key=spamservice";
                   if ( is_numeric( $data['_expires'] ) && time() > $data['_expires'] )
                   {
                                $entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_expired'], $disableLink ) );
                   }
                   else
                   {
                                $entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_unavailable'], $disableLink ) );
                   }
                   $GOT_SPAM_ERROR = true;
                   break;
                  }
                 }
                }
                if ( ! $GOT_SPAM_ERROR )
                {
                 /* Get last 5 logs, and if all 5 are errors, show message
                 $_errors = 0;
                 $_entries = 0;
                 $_lastError = '';
                 $this->DB->build( array( 'select' => 'log_code, log_msg', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 5 ) );
                 $this->DB->execute();
                 while( $_r = $this->DB->fetch() )
                 {
                  $_entries++;
                  if( $_r['log_code'] === '0' )
                  {
                   $_errors++;
                   if( !$_lastError )
                   {
                                $_lastError = $_r['log_msg'];
                   }
                  }
                 }
                 if( $_entries > 0 && $_errors == $_entries )
                 {
                  $entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_error_msg'], $_lastError ) );
                 }
                }
   }
   /* If it's disabled, are we entitiled to it?
   else
   {
                $licenseData = $this->cache->getCache( 'licenseData' );
                if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
                {
                 foreach ( $licenseData['ipbMain'] as $data )
                 {
                  if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] == 'Ok' )
                  {
                   $entries[] = array( $this->lang->words['spam_service_disabled'], $this->lang->words['spam_service_disabled_msg'] );
                   break;
                  }
                 }
                }
   }
  }
  */


 Save and you're done.

In general, this works for 3.2.x, 3.3.x and 3.4.x.

it's there How to Remove "License Key Missing" Warning in ACP New Tutorial 2015, Greetings

[ Tutorial ] How to change the default mobile skin in 3.4.x

How to change the default mobile skin in 3.4.x. If you have installed a new mobile skin on IP.Board and want to make it the default version, as well as updating User agents you also must change the skin key in Admin CP. That option is actually hidden and you have to edit a little to get it to show up.

This is the simplest way I know to change the default forum skin on IP.Board. The skin key is hidden and there's no option to change it from the Admin CP.



FTP into your forum and navigate to admin/applications/core/skin_cp and download the file cp_skin_templates.php

Open this file in an editor (I use Notepad++) and scroll down to line 1401

if ( $skinSet['set_key'] != 'mobile' && $skinSet['set_key'] != 'default' )


change this to

if ( $skinSet['set_key'] != 'nmobile' && $skinSet['set_key'] != 'default' )


Save and close the file and transfer is back via ftp to where you downloaded it from.

In AdminCP select Look & Feel/Manage skins and templates and edit settings for IP.Board Mobile, there should now be a drop down box which says Skin key - mobile, change this to mobile_123 or anything that isn't "mobile" and save the settings. Now go to your new mobile skin and edit settings, in the drop down for Skin Key change this to mobile and save your settings. 

Wednesday, September 25, 2013

How to Easily Smooth Board Width Changer On IP. Board

How to Easily Smooth Board Width Changer On IP. Board. I was originally going to make a hook for this, and I got quite far with it too. But, I ran into a few problems and just couldn't get it to work. So I'm making a tutorial for it.

Please note: This was done on the default IPB skin. This may be different for you, depending on the skin you're using.

  • Go to your ACP
  • Look & Feel
  • Your Skin
  • globalTemplate.

Find this:

        {parse template="includeJS" group="global" params="$jsModules"}
        {parse template="includeFeeds" group="global" params="$documentHeadItems"}
        {parse template="includeRTL" group="global" params=""}        
        {parse template="includeVars" group="global" params="$header_items"}


Add this code above it:
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>
<script type='text/javascript' src="{style_images_url}/boardwidth.js"></script>


Next go to :
  • Go to your ACP
  • Look & Feel
  • Your Skin
  • CSS
  • ipb_styles.css.

Find this:

#content, .main_width {
    margin: 0 auto;
    /* Uncomment for fixed */
    /*width: 980px;*/
    /* Fluid */
    width: 87% !important;
       min-width: 960px;
}


Change it to this:

#content, .main_width {
    margin: 0 auto;
    /* Uncomment for fixed */
    width: 980px;
    /* Fluid */
    /*width: 87% !important;*/
       min-width: 960px;
}


And save.

Next Go back to your globalTemplate and find this:

<if test="showhomeurl:|:$this->settings['home_url'] AND $this->settings['home_name']">


Add this code above it:

<li class='right widthSwitch'><a href="#">Change Width</a></li>


Note: You can place a link for this anywhere you want, I'm just using this location for tutorial purposes.


Next Now, you're going to code and paste the following code into Notepad or anything you prefer, and save it as "boardwidth.js".
Here is the code:

/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1;}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires="; expires="+date.toUTCString();}var path=options.path?"; path="+(options.path):"";var domain=options.domain?"; domain="+(options.domain):"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("");}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+"=")){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};

jQuery.noConflict();
jQuery(document).ready(function($){

    // Board Width Changer
    var widthElem = '#content, .main_width'
    var    elemProp = $(widthElem).css('width')
    var    fluidWidth = 87;

    if( $.cookie('boardWidth') !== null ) {
        if ( $.cookie('boardWidth') == 'fluid' ) {
            $(widthElem).css('width', fluidWidth + '%');
         }
        if ( $.cookie('boardWidth') == 'fixed' ) {
            $(widthElem).css('width', elemProp);
        }
    }

    $('.widthSwitch a').click(function() {
        if ( $(widthElem).css('width') == elemProp ) {
            $(widthElem).animate({ width: fluidWidth + '%' });
            $.cookie('boardWidth', 'fluid');
        } else {
            $(widthElem).animate({ width: elemProp });
            $.cookie('boardWidth', 'fixed');
        }
        return false;
    });
});



Then go to
  • your FTP
  • public_html 
  • public
  • style_images 
  • (Your skin name)
  • Then upload the boardwidth.js file in that folder.


And you're done!
A smooth board width changer, made with jQuery.
This saves a cookie in your web browser, so each time you visit, it will be the same as the last time you visited ( until you clear your cookies ).

How to Easily Smooth Board Width Changer On IP. Board


Remember that the instructions may be a bit different depending on what skin you're using.
If you need help adding this to your board, just leave me a PM and I will reply whenever I read it.


It is How to Easily Smooth Board Width Changer On IP. Board, Good Luck!

Sunday, September 22, 2013

How to Easily Disable Fast Reply On IP. Board

How to Easily Disable Fast Reply On IP. Board. A few people have expressed an interest in removing the fast reply from topic view. Here is a simple skin edit to do that.

Preview Demo :

How to Easily Disable Fast Reply On IP. Board


Its in two parts as part 1 involves removing the fast reply window and part 2 adds the 'post reply' button to the end of the page, otherwise you'd have to scroll to the top to add a reply.

Tutorial :
  • ACP 
  • Look / Feel 
  • Skin Manager 
  • (choose skin) 
  • Templates / CSS 
  • Topic View 
  • TopicViewTemplate


Part One, remove the fast reply box:

Find...

<if test="fastReply:|:$displayData['fast_reply'] && $displayData['reply_button']['url']">
<hr>
<div class="ipsBox" id="fast_reply_wrapper">
    <div class="ipsBox_container ipsPad">
        <h1 class="ipsType_subtitle">{$this->lang->words['topic_add_reply']}</h1>
        <if test="isLockedFR:|:$topic['state'] == 'closed'"><span class="error">{$this->lang->words['locked_reply_fr']}</span>
</if>
        
        <if test="isMember:|:$this->memberData['member_id']">
            <a href="%7Bparse%20url=" showuser="{$this-">memberData['member_id']}" seotitle="{$this->memberData['members_seo_name']}" template="showuser" base="public"}" title='{$this->lang->words['your_profile']}' class='ipsUserPhotoLink left'><img src="%7B$this-%3EmemberData[" pp_small_photo']}'="" alt="{parse expression=" sprintf($this-="">lang->words['users_photo'],$this->memberData['members_display_name'])"}" class='ipsUserPhoto ipsUserPhoto_medium' /></a>
        <else>
            <div class="left">{IPSMember::buildNoPhoto(0, 'small' )}</div>
        </else></if>
        <div class="ipsBox_withphoto clearfix">
            <form action="{parse url=" "="" base="public" }"="" method="post" id="ips_fastReplyForm">
                <input name="app" value="forums" type="hidden">
                <input name="module" value="post" type="hidden">
                <input name="section" value="post" type="hidden">
                <input name="do" value="reply_post_do" type="hidden">
                <input name="f" value="{$forum['id']}" type="hidden">
                <input name="t" value="{$topic['tid']}" type="hidden">
                <input name="st" value="{$this->request['st']}" type="hidden">
                <input name="auth_key" value="{$this->member->form_hash}" type="hidden">
                <input name="fast_reply_used" value="1" type="hidden">
                <input name="enableemo" value="yes" type="hidden">
                <input name="enablesig" value="yes" type="hidden">
                <if test="$this->memberData['auto_track']">
                    <input name="enabletrack" value="1" type="hidden">
                </if>
                <if test="is_array($topic['_fastReplyStatusMessage']) AND count($topic['_fastReplyStatusMessage']) AND strlen($topic['_fastReplyStatusMessage'][0])">
                    <div class="message">{parse expression="implode( '
', $topic['_fastReplyStatusMessage'] )"}</div>
                </if>
                {parse editor="Post" options="array( 'type' => 'full', 'minimize' => 1, 'isTypingCallBack' => 'ipb.topic.isTypingCallBack', 'height' => 180, 'autoSaveKey' => 'reply-' . $topic[tid] )"}
                
                
                <fieldset class="right" id="fast_reply_controls">
                    <input name="submit" class="input_submit" value="{$this->lang->words[" qr_post']}'="" tabindex="0" accesskey="s" id="submit_post" type="submit">&nbsp;&nbsp;<input name="preview" class="input_submit alt" value="{$this->lang->words[" qr_more_opts']}'="" tabindex="0" id="full_compose" type="submit">            
                </fieldset>
            </form>
        </div>
        <div id="ips_HasReplies"></div>
    </div>
</div>

<else>
    <if test="loadJsManually:|:$displayData['load_editor_js']">
        {parse template="editorLoadJs" group="editors" params="$displayData['smilies']"}
    </if>
</else></if>


Comment it out by adding a <!-- to the start and a --> to the end (do not remove the code)


Part two, add 'post reply' to the end of the page.

Immediately after the code you have removed, you'll see this line:

<!-- Close topic -->


Add the following code just above that 'close topic' line but after the code you commented out:

<ul class="topic_buttons">
        <if test="closedButton:|:$displayData['reply_button']['image'] == 'locked'">
            <li class="important">
                <if test="pollOnly:|:isset($displayData['poll_data']['poll']['poll_only']) && $displayData['poll_data']['poll']['poll_only']">
                    <if test="closedButtonLink:|:$displayData['reply_button']['url']">
                        <a href="%7B$displayData[" reply_button']['url']}'="" accesskey="r">{parse replacement="lock_icon"} {$this->lang->words['top_poll_only_reply']}</a>
                    <else>
                        <span>{parse replacement="lock_icon"} {$this->lang->words['top_poll_only']}</span>
                    </else></if>
                <else>
                    <if test="closedButtonLink:|:$displayData['reply_button']['url']">
                        <a href="%7B$displayData[" reply_button']['url']}'="" accesskey="r">{parse replacement="lock_icon"} {$this->lang->words['top_locked_reply']}</a>
                    <else>
                        <span>{parse replacement="lock_icon"} {$this->lang->words['top_locked']}</span>
                    </else></if>
                </else></if>
            </li>
        <else>
            <if test="replyButton:|:$displayData['reply_button']['image']">
                <if test="replyButtonLink:|:$displayData['reply_button']['url']">
                    <li><a href="%7B$displayData[" reply_button']['url']}'="" title="{$this->lang->words[" topic_add_reply']}'="" accesskey="r">{$this->lang->words['topic_add_reply']}</a></li>
                <else>
                    <li class="disabled"><span>{$this->lang->words['top_cannot_reply']}</span></li>
                </else></if>
            </if>
        </else></if>
    </ul>


Save.


 It is How to Easily Disable Fast Reply On IP. Board, Good luck!

Saturday, September 21, 2013

Show Forum Description Inside Tooltips On IP. Board

Show Forum Description Inside Tooltips On IP. Board. To beautify and make your website or forum to be elegant you can implement tooltips that I will give below. Please follow my tutorial at below!

Tutorial :
1. Go to: 
  • ACP
  • Look & Feel 
  • Manage Skin Sets & Templates 
  • Manage Templates in -Your Skin 
  • Board Index  
  • boardIndexTemplate



2. Find:
<h4><a href="{parse url="showforum={$forum_data['id']}" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}" title='{parse expression="IPSText::striptags( IPSText::htmlspecialchars( $forum_data['name'] ) )"}'>{$forum_data['name']}</a></h4>
                                                    <p class='desc'>{$forum_data['description']}</p>
 


3. Replace With:
<h4><a href="{parse url="showforum={$forum_data['id']}" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}" class="tooltipforum" title="{$forum_data['description']}"><span title='{parse expression="IPSText::striptags( IPSText::htmlspecialchars( $forum_data['name'] ) )"}'>{$forum_data['name']}</span></a><span class='ipsBadge ipsBadge_purple' style='vertical-align: top; margin-left: 5px;'>Redirect</span></h4>
 


4. Go to:
  • ACP
  • Look & Feel 
  • Manage Skin Sets & Templates
  • Manage Templates in 
  • Your Skin
  • ipb_styles.css

 
5. Add: (Anywhere, but suggested at the bottom)
  
.tooltipforum{
display: inline;
position: relative;
}

.tooltipforum:hover:after{
background: #333;
background: rgba(0,0,0,.8);
border-radius: 5px;
bottom: 26px;
color: #fff;
content: attr(title);
left: 20%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 400px;
font-size:12px;
}

.tooltipforum:hover:before{
border: solid;
border-color: #333 transparent;
border-width: 6px 6px 0 6px;
bottom: 20px;
content: "";
left: 50%;
position: absolute;
z-index: 99;
}
 


Default preview:


After tutorial:


 Hope This tutorial helped you.