Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 33
» Latest member: taplok
» Forum threads: 32
» Forum posts: 67

Full Statistics

Online Users
There are currently 2 online users.
» 0 Member(s) | 2 Guest(s)

Latest Threads
Imgur version
Forum: Bugs
Last Post: KimmyD
06-03-2017, 07:31 PM
» Replies: 0
» Views: 151
Imgur 2.3
Forum: Questions and answers
Last Post: KimmyD
06-03-2017, 05:38 PM
» Replies: 0
» Views: 112
Hide email in posts
Forum: Tutorials
Last Post: CrazyCat
03-13-2017, 01:11 PM
» Replies: 0
» Views: 176
ABP Notice
Forum: Releases
Last Post: CrazyCat
11-28-2016, 12:05 PM
» Replies: 3
» Views: 1,370
ABP Imgur
Forum: Releases
Last Post: CrazyCat
11-15-2016, 03:00 PM
» Replies: 5
» Views: 1,851
test
Forum: Tests
Last Post: CrazyCat
11-14-2016, 02:03 PM
» Replies: 0
» Views: 333
ABP GeSHi
Forum: Releases
Last Post: CrazyCat
10-27-2016, 04:53 PM
» Replies: 1
» Views: 508
test geshi
Forum: Tests
Last Post: CrazyCat
10-26-2016, 04:31 PM
» Replies: 0
» Views: 289
ABP lightIRC chat
Forum: Releases
Last Post: CrazyCat
10-23-2016, 03:21 PM
» Replies: 11
» Views: 5,519
test imgur
Forum: Tests
Last Post: CrazyCat
10-09-2016, 11:28 AM
» Replies: 0
» Views: 267

 
  APB Force Portal error
Posted by: sc4t - 10-12-2015, 07:04 AM - Forum: Bugs - Replies (1)

Hello!

When I activate the plugin ABP Force Portal I have an error message
[url=http://ab-plugin.cc/ABP-Force-Portal-t-14.html][/url]


Code:
Fatal error: Call to undefined function abp_forceportal_deactivate() in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/forum/inc/plugins/abp_forceportal.php on line 38

Print this item

  Manage modal / dialog
Posted by: CrazyCat - 06-18-2015, 04:36 PM - Forum: Tutorials - No Replies

To open a modal box, use:

Code:
javascript:MyBB.popupWindow('yoururl?popup=true&editor=MyBBEditor&modal=1')

To close it:
Code:
$.modal.close();

Print this item

  Thread title hashtags
Posted by: CrazyCat - 05-07-2015, 01:34 PM - Forum: Plugins - No Replies

Goal: add hashtags in thread titles, which are replaced by html.

Examples:
#FR will display [Image: france_flag_icon.png],
#important will display Important !

Print this item

  ABP Multi-Domain
Posted by: CrazyCat - 05-07-2015, 09:57 AM - Forum: Releases - Replies (10)

This MyBB plugin allows admin to set several urls used to access the same forum.

Installation

  • Upload the content of the UPLOAD/ directory to your MyBB root
  • Install the plugin from the ACP
  • Go to the _ABP Multidomain_ configuration panel
  • Add new urls

TO DO
  • Manage admin rights : actually, any admin can manage domains

Print this item

  ABP User Blog
Posted by: CrazyCat - 04-30-2015, 03:50 PM - Forum: Suggestions - No Replies

Goal: let user have a blog (editable page, date descending)

Print this item

  Use the good codename
Posted by: CrazyCat - 04-17-2015, 04:48 PM - Forum: Tutorials - No Replies

MyBB uses the plugin info "codename" to check plugins updates. This codename is set when creating a project on MyBB community.
   

The codename must match the plugin's filename without the .php extension, like abp_autodownpics if the plugin file is abp_autodownpics.php.

The simplest way to have the good and generic info, even if you change your filename, is to do:

PHP Code:
function yourplugin_info()
{
   return array(
      
/* ... */
      
'codename' => str_replace('.php'''basename(__FILE__))
   );


I like having the codename accessible for any function, so I create a constant to store the codename value. The constant must be unique it is a good idea to define some kind of rules, see below mine as an example.
  • CN_ (for CodeName)
  • ABP (for Another Bugged Plugin)
  • XXX are the plugin "human name" first letters

Examples : CN_ABPFP for Force Portal, CN_ABPLIC for [i]lightIRC Chat[/b], ...

To sumarize, given all the explanation detailed above, the plugin template would start as follow:
PHP Code:
<?php
/**
 * Description of the plugin
 * This one is "My Example Plugin"
 * Its file is myexample.php
 * By CrazyCat <http://ab-plugin.cc>
 */
if(!defined("IN_MYBB")) die("Direct initialization of this file is not allowed.<br />Please make sure IN_MYBB is defined.");

// Unique constant used as codename
define('CN_ABPMEP'str_replace('.php'''basename(__FILE__)));

function 
myexample_info()
{
   global 
$lang;
   
$lang->load(CN_ABPMEP);
   return array(
      
"name" => $lang->myexample_name,
      
"description" => $lang->myexample_desc,
      
"website" => "http://ab-plugin.cc/ABP-My-Example-Plugin-t-99.html",
      
"author"    => "CrazyCat",
      
"authorsite"    => "http://ab-plugin.cc",
      
"version"    => "1.0",
      
"compatibility" => "18*",
      
"codename"    => CN_ABPMEP
   
);
}

/* ... */ 

Please note that the constant is also used to load language files, so they have to be named myexample.lang.php. This rule is a precept of MyBB developper guide.

Print this item

  ABP Force Portal
Posted by: CrazyCat - 04-09-2015, 10:03 AM - Forum: Releases - Replies (3)

This plugin forces an user who didn't came on the forum since a delay you fix (in hours) to land to the portal if he access the index page.

Category : Miscealanous

Stable release :

Changelog :
  • Version 1.0 (04-09-2015)
    • Initial release

Print this item

  Table with alternated rows
Posted by: CrazyCat - 04-08-2015, 01:41 PM - Forum: Tutorials - No Replies

This is not a simple MyCode because there's a small addition in the global.css file, I'll do a plugin later if it's useful.

The goal: creating tables in MyBB posts with alternate lines design (odd and even).

It requires 4 MyCode and 3 css addition.

--- MyCode ---

Table

Regular Expression :

Code:
\[table\](.*?)\[/table\]
Replacement :
Code:
<table class="clear" cellspacing="0" cellpadding="5"  style="border:0; radius:0;">$1</table>

Table row

Regular Expression :
Code:
\[tr\](.*?)\[/tr\]
Replacement :
Code:
<tr class="trowaltern">$1</tr>

Table head

Regular Expression :
Code:
\[th\](.*?)\[/th\]
Replacement :
Code:
<th class="thead" valign="middle" style="text-align:center; border-radius:0;"><strong>$1</strong></th>

Table data

Regular Expression :
Code:
\[td\](.*?)\[/td\]
Replacement :
Code:
<td valign="top">$1</td>

--- CSS ---
Code:
/* global values for table data */
.trowaltern > td {
    border: 1px solid;
    border-color: #fff #ddd #ddd #fff;
}
/* even row background */
.trowaltern:nth-child(even) { background: #f5f5f5; }
/* odd row background */
.trowaltern:nth-child(odd) { background: #efefef; }

Print this item

  Title notification for DVZ Shoutbox 2.1.x
Posted by: CrazyCat - 04-08-2015, 01:31 PM - Forum: Tutorials - No Replies

Based on Sound notification for DVZ Shoutbox 2.1.x, I've done a visual alert.

It uses jQuery Title Alert.


1. upload the jquery.titlealert.js file into jscripts/ directory on your server

.zip   jquery.titlealert.js.zip (Size: 1.94 KB / Downloads: 7)

2. Open the dvz_shoutbox template (Global Templates) and add the following code after {$javascript}

Code:
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/jquery.titlealert.js"></script>
<script>
dvz_shoutbox.callbacks['update'].push(function(){
  if ($('#shoutbox .entry.new').length) {
    $.titleAlert('Activity on ShoutCast', {requireBlur:true});
  }
});</script>

Print this item

  Ignore threads
Posted by: CrazyCat - 04-08-2015, 12:23 PM - Forum: Plugins - No Replies

Goal: let users to ignore thread and forums

Working:
on ignore added, subscription to the forum/thread and childs must be removed
on subscriptions added, ignores to the forum/thread and childs must be removed

File list:

  • inc/plugins/abp_ignores.php
  • inc/langages/english/ab_ignores.lang.php
  • inc/langages/english/admin/ab_ignores.lang.php

Hook used:
  • usercp2_start => actions : addignore, ignore, forumignore
  • usercp_start => same actions, with do_
  • usercp_menu_built => create the 2 ignores item in menu (based on subscription)
  • thread deleted, forum deleted
  • subscription added

Print this item