MyBB Tutorials

Color picker - for 1.8

Submitted by Akay, , Thread ID: 1996

Thread Closed

RE: Color picker - for 1.8

This post was last modified: 08-05-2016, 05:31 PM by Carb0n
#24
08-05-2016, 05:29 PM
linkzy Wrote:
08-05-2016, 05:27 PM
Carb0n Wrote:
08-05-2016, 05:26 PM
linkzy Wrote:
08-05-2016, 05:19 PM
Carb0n Wrote:
I've tried to implement this on a test forum and it isn't working, can anyone help me?
I added
Code:
<script type="text/javascript" src="{$mybb-> settings ['bburl']} / picker / js / jquery.min.js "> </ script>
<script type = "text / javascript" src = "{$ MyBB-> settings ['bburl']} / picker / js / colorpicker.js"> </ script>
<script type="text/javascript" src="{$mybb-> settings ['bburl' ]} / picker / js / skin.js "> </ script>
<script type="text/javascript" src="{$mybb-> settings ['bburl']} / picker / js / cookie.js "> </ script>
at the top of the headerinclude, i uploaded the zip folder(ofc unzipped) to the root of the website.
I placed
Code:
<span class='custom_theme'><input type='text' id='colorpicker' /></span>
in the header template and it only appears this--> http://img.prntscr.com/img?url=http://i....OoY8DS.png (If clicked nothing happen).
Thanks, Carb0n

Which theme are you using ?

I'm using the alphaboards ripped theme

Can you share your headerinclude template here ?
Im lazy to get the theme now.

Ok
Code:
<script type="text/javascript" src="{$mybb->settings['bburl']}/picker/js/jquery.min.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/picker/js/colorpicker.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/picker/js/skin.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/picker/js/cookie.js"></script>
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.plugins.min.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1800"></script>

<script type="text/javascript">
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='http://code.jquery.com/jquery-1.7.2.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript">

var quoteMsg = "View More";
var quotePop = "Too Many Quotes";

jQuery(function() {
   jQuery('blockquote:not(blockquote > blockquote)').each(function(a, b) {
       jQuery(this).children('blockquote').each(function() {
         jQuery(this).html("<div><div class=\"spoilerheader\">" + quoteMsg + " <a href=\"javascript:void(0);\" class=\"spoilerclick\">(" + quotePop + ")</a></div><div class=\"spoilerbody\" style=\"display: none;\">" + jQuery(this).html() + "</div></div>");
       });
    
   });
jQuery(".spoilerclick").click(function() {

   var spoiler = jQuery(this).parent().parent();
   jQuery(spoiler).children(".spoilerbody").show();
   jQuery(spoiler).children(".spoilerheader").hide();
})
});

</script>
{$stylesheets}
<script type="text/javascript">
<!--
lang.unknown_error = "{$lang->unknown_error}";

lang.select2_match = "{$lang->select2_match}";
lang.select2_matches = "{$lang->select2_matches}";
lang.select2_nomatches = "{$lang->select2_nomatches}";
lang.select2_inputtooshort_single = "{$lang->select2_inputtooshort_single}";
lang.select2_inputtooshort_plural = "{$lang->select2_inputtooshort_plural}";
lang.select2_inputtoolong_single = "{$lang->select2_inputtoolong_single}";
lang.select2_inputtoolong_plural = "{$lang->select2_inputtoolong_plural}";
lang.select2_selectiontoobig_single = "{$lang->select2_selectiontoobig_single}";
lang.select2_selectiontoobig_plural = "{$lang->select2_selectiontoobig_plural}";
lang.select2_loadmore = "{$lang->select2_loadmore}";
lang.select2_searching = "{$lang->select2_searching}";

var cookieDomain = "{$mybb->settings['cookiedomain']}";
var cookiePath = "{$mybb->settings['cookiepath']}";
var cookiePrefix = "{$mybb->settings['cookieprefix']}";
var deleteevent_confirm = "{$lang->deleteevent_confirm}";
var removeattach_confirm = "{$lang->removeattach_confirm}";
var loading_text = '{$lang->ajax_loading}';
var saving_changes = '{$lang->saving_changes}';
var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
var my_post_key = "{$mybb->post_code}";
var rootpath = "{$mybb->settings['bburl']}";
var imagepath = "{$theme['imgdir']}";
  var yes_confirm = "{$lang->yes}";
var no_confirm = "{$lang->no}";
var MyBBEditor = null;

function dismissANN(id)
{
if(!$("Ann_"+id))
{
return false;
}

if(use_xmlhttprequest != 1)
{
return true;
}

new Ajax.Request("index.php?action=ann_dismiss", {method: "post", postBody: "ajax=1&my_post_key="+my_post_key+"&id="+id});
Element.remove("Ann_"+id);
return false;
}
    var spinner_image ="";
var spinner = "<div class='modal-spinner'></div>";
    var default_avatar = "{$mybb->settings['useravatar']}";
    var theme_id = "{$theme['tid']}";
// -->
</script>

<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/tabcontent.js">
/***********************************************
* Tab Content script v2.2- copyright Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" />

<script type="text/javascript" src="{$theme['imgdir']}/theme_functions.js"></script>

<script type="text/javascript">
    var unreadAlerts = {$mybb->user['unreadAlerts']};
</script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/myalerts.js"></script>

Thanks for you time dude
we are all supposed to think of reasons to live

Users browsing this thread: 3 Guest(s)