MyBB Community Forums

Full Version: Portal Drag n Drop Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2010-01-02, 11:38 AM)Jammerx2 Wrote: [ -> ]Lol @200 hours, it should take no more than a week to create at max. Either way, too much time to spend on a free plugin. And it's not saved into templates, there would have to be extra columns in users saving their position for it.

I had originally thought he meant for Admins to be able to do it. But for each user to have it custom would mean adding a CUSTOM template field into the user table... or at least that's how I would do it.
In other words alot of coding But im on the job
(2010-01-02, 06:50 PM)halohub Wrote: [ -> ]In other words alot of coding But im on the job

After looking at this thread of yours where you didn''t know how to disable the quick edit, I seriously doubt that you can create this plugin which will require far more serious and bigger edits. But I could be wrong if you learned coding in the last couple of weeks.

http://community.mybboard.net/thread-61785.html
(2010-01-02, 06:48 PM)ralgith Wrote: [ -> ]
(2010-01-02, 11:38 AM)Jammerx2 Wrote: [ -> ]Lol @200 hours, it should take no more than a week to create at max. Either way, too much time to spend on a free plugin. And it's not saved into templates, there would have to be extra columns in users saving their position for it.

I had originally thought he meant for Admins to be able to do it. But for each user to have it custom would mean adding a CUSTOM template field into the user table... or at least that's how I would do it.

Sorta like that, really just a way to show the order that the select it in and in the plugin set it to that order. E.G. The default is 1,2,3,4,5,6,7,8,9 but user can set it to whatever they want dragging and dropping. The only hard part is the drag and drop, just having them set it would be easy.
I like the idea for admins but not for every member.
It would just be to customize for every member, there would be no need for drag and drop if it was admins only...
I have learnt a whole load of coding after the last few weeks I was on my laptop solidly for 100-200 hours just learning coding in all senses

HTML, CSS, PHP, Jscript, SYNTAX and a whole load of others I have memorsed nearly every hex color for CSS
Hex colour is something that does not need to be memorized, just remember its RGB and how to use google. I doubt you've learned enough to create this plugin.
i have trust me

This is something i wrote

Called whenever a plugin is installed by clicking the "Install" button in the plugin manager. *   If no install routine exists, the install button is not shown and it assumed any work will be *   performed in the _activate() routine. * * function hello_install() * { * } * * _is_installed(): *   Called on the plugin management page to establish if a plugin is already installed or not. *   This should return TRUE if the plugin is installed (by checking tables, fields etc) or FALSE *   if the plugin is not installed. * * function hello_is_installed() * { * } * * _uninstall(): *    Called whenever a plugin is to be uninstalled. This should remove ALL traces of the plugin *    from the installation (tables etc). If it does not exist, uninstall button is not shown. * * function hello_uninstall() * { * } * * _activate(): *    Called whenever a plugin is activated via the Admin CP. This should essentially make a plugin *    "visible" by adding templates/template changes, language changes etc. * * function hello_activate() * { * } * * _deactivate(): *    Called whenever a plugin is deactivated. This should essentially "hide" the plugin from view *    by removing templates/template changes etc. It should not, however, remove any information *    such as tables, fields etc - that should be handled by an _uninstall routine. When a plugin is *    uninstalled, this routine will also be called before _uninstall() if the plugin is active. * * function hello_deactivate() * { * } */function editdesign(){global $mybb,$lang,$templates,$invcopy,$db;$lang->load("profiledesign");if($mybb->input['action'] == "editdesign"){$user = $_COOKIE['mybbuser'];$userid = explode("_", $user, 2);                  $query = $db->simple_select("users","profilebordercolor,profilebordertyp,profilebordersize,profilebg,theadbg,theadcolor,trow1bg,trow1color,trow2bg,trow2color,tborderbg,tborderborder", "uid= ".$userid[0]."", array('order_by' => 'uid', 'order_dir' => 'DESC', 'limit' =>'1'));			$editdesign = $db->fetch_array($query);			$profilebordercolor = $editdesign['profilebordercolor'];                         $profilebordertyp = $editdesign['profilebordertyp'];                         $profilebordersize = $editdesign['profilebordersize'];                         $profilebg = $editdesign['profilebg'];                         $theadbg = $editdesign['theadbg'];                         $theadcolor = $editdesign['theadcolor'];                         $trow1bg = $editdesign['trow1bg'];                         $trow2bg = $editdesign['trow2bg'];                         $trow1color = $editdesign['trow1color'];                         $trow2color = $editdesign['trow2color'];                         $tborderbg = $editdesign['tborderbg'];                         $tborderborder = $editdesign['tborderborder'];global $headerinclude,$header,$usercpnav,$theme,$footer;eval("\$editdesign = \"".$templates->get("usercp_editdesign")."\";");	output_page($editdesign);}if($mybb->input['action'] == "savedesign"){$user = $_COOKIE['mybbuser'];$userid = explode("_", $user, 2);$db->update_query("users", array('profilebg' => $_POST['profilebg'] , 'profilebordercolor' => $_POST['profilebordercolor'] , 'profilebordertyp' => $_POST['profilebordertyp'] , 'profilebordersize' => $_POST['profilebordersize'] , 'theadbg' => $_POST['theadbg'] , 'theadcolor' => $_POST['theadcolor'] , 'tborderbg' => $_POST['tborderbg'] , 'tborderborder' => $_POST['tborderborder'] , 'trow1bg' => $_POST['trow1bg'] , 'trow1color' => $_POST['trow1color'], 'trow2bg' => $_POST['trow2bg'] , 'trow2color' => $_POST['trow2color']) , "uid='".$mybb->user['uid']."'");$query = $db->simple_select("users", "profilebordercolor,profilebordertyp,profilebordersize,profilebg,theadbg,theadcolor,trow1bg,trow1color,trow2bg,trow2color,tborderbg,tborderborder", "uid= ".$userid[0]."", array('order_by' => 'uid', 'order_dir' => 'DESC', 'limit' => '1'));			$editdesign = $db->fetch_array($query);			$profilebordercolor = $editdesign['profilebordercolor'];                         $profilebordertyp = $editdesign['profilebordertyp'];                         $profilebordersize = $editdesign['profilebordersize'];                         $profilebg = $editdesign['profilebg'];                         $theadbg = $editdesign['theadbg'];                         $theadcolor = $editdesign['theadcolor'];                         $trow1bg = $editdesign['trow1bg'];                         $trow2bg = $editdesign['trow2bg'];                         $trow1color = $editdesign['trow1color'];                         $trow2color = $editdesign['trow2color'];                         $tborderbg = $editdesign['tborderbg'];                         $tborderborder = $editdesign['tborderborder'];        global $headerinclude,$header,$usercpnav,$theme,$footer;	eval("\$editdesign = \"".$templates->get("usercp_editdesign")."\";");	output_page($editdesign);}}function loaddesign(){global $memprofile,$usergb,$mybb, $theme,$db, $templates,$lang,$profilebordercolor,$profilebordertyp,$profilebordersize,$profilebg,$theadbg,$theadcolor,$trow1bg,$trow1color,$trow2bg,$trow2color,$tborderbg,$tborderborder;$query = $db->simple_select("users", "profilebordercolor,profilebordertyp,profilebordersize,profilebg,theadbg,theadcolor,trow1bg,trow1color,trow2bg,trow2color,tborderbg,tborderborder", "uid= ".$_GET['uid']."", array('order_by' => 'uid', 'order_dir' => 'DESC', 'limit' => '1'));			$showdesign = $db->fetch_array($query);			$profilebordercolor = $showdesign['profilebordercolor'];                         $profilebordertyp = $showdesign['profilebordertyp'];                         $profilebordersize = $showdesign['profilebordersize'];                         $profilebg = $showdesign['profilebg'];                         $theadbg = $showdesign['theadbg'];                         $theadcolor = $showdesign['theadcolor'];                         $trow1bg = $showdesign['trow1bg'];                         $trow2bg = $showdesign['trow2bg'];                         $trow1color = $showdesign['trow1color'];                         $trow2color = $showdesign['trow2color'];                         $tborderbg = $showdesign['tborderbg'];                         $tborderborder = $showdesign['tborderborder'];                         }function profiledesigns_activate(){	global $db, $mybb;	include MYBB_ROOT."/inc/adminfunctions_templates.php";         $loadstyle22 = '<style>.thead {	background: {$theadbg} ;	color: {$theadcolor};}.tborder {	background: {$tborderbg};	border: 1px solid {$tborderborder};}.trow1 {	background: {$trow1bg};        color:{$trow1color};}.trow2 {	background: {$trow2bg};        color:{$trow1color};}.profile {padding:10px;background:{$profilebg};margin-right:auto;border:{$profilebordersize} {$profilebordertyp} {$profilebordercolor};}</style>';         find_replace_templatesets("member_profile", "#".preg_quote('{$headerinclude}')."#i", '{$headerinclude} '.$loadstyle22.'');         find_replace_templatesets("member_profile", "#".preg_quote('{$header}')."#i", '{$header} <div class=profile > ');         find_replace_templatesets("member_profile", "#".preg_quote('{$footer}')."#i", '</div>Profiledesign Mod by <a href="http://i-net.bplaced.net">iNet</a> {$footer}');         find_replace_templatesets("usercp_nav_profile", "#".preg_quote('{$changenameop}')."#i", '<div><a href="usercp.php?action=editdesign" class="usercp_nav_item usercp_nav_editsig">Design</a></div>{$changenameop}');         $new_templates = array();         $new_templates['usercp_editdesign'] = '<html><head><title>{$mybb->settings[\'bbname\']} - {$lang->edit_design}</title>{$headerinclude}</head><body>{$header}<form action="usercp.php?action=savedesign" method="post"><input type="hidden" name="my_post_key" value="{$mybb->post_code}" /><table width="100%" border="0" align="center"><tr>{$usercpnav}<td valign="top"><table border="0" cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" class="tborder"><tr><td class="thead" colspan="2"><strong>{$lang->edit_sig}</strong></td></tr><tr><td class="trow1"  width="20%">{$lang->d_profile}</td><td class="trow2" width="80%">{$lang->d_bgcolor}<br><img src="images/color_wheel.png">&nbsp;<input name="profilebg" value="{$profilebg}"><br><br>{$lang->d_bcolor}/{$lang->d_btype}/{$lang->d_bsize}<br><img src="images/color_wheel.png">&nbsp;<input name="profilebordercolor" value="{$profilebordercolor}">   <input name="profilebordertyp" value="{$profilebordertyp}">    <input name="profilebordersize" value="{$profilebordersize}" name="bordertyp2"></form><br></td></tr><tr><td class="trow1" width="20%">{$lang->d_thead}</td><td class="trow2">{$lang->d_bgcolor}<br><img src="images/color_wheel.png">&nbsp;<input name="theadbg" value="{$theadbg}"><br><br>{$lang->d_color}<br><img src="images/color_wheel.png">&nbsp;<input name="theadcolor" value="{$theadcolor}"></td></tr><tr><td class="trow1">{$lang->d_trow1}</td><td class="trow2">{$lang->d_bgcolor}<br><img src="images/color_wheel.png">&nbsp;<input name="trow1bg" value="{$trow1bg}"><br><br>{$lang->d_color}<br><img src="images/color_wheel.png">&nbsp;<input name="trow1color" value="{$trow1color}"></td></tr><tr><td class="trow1">{$lang->d_trow2}</td><td class="trow2">{$lang->d_bgcolor}<br><img src="images/color_wheel.png">&nbsp;<input name="trow2bg" value="{$trow2bg}"><br><br>{$lang->d_color}<br><img src="images/color_wheel.png">&nbsp;<input name="trow2color" value="{$trow2color}"></td></tr><tr><td class="trow1">{$lang->d_border}</td><td class="trow2">{$lang->d_bgcolor}<br><img src="images/color_wheel.png">&nbsp;<input name="tborderbg" value="{$tborderbg}"><br><br>{$lang->d_bcolor}<br><img src="images/color_wheel.png">&nbsp;<input name="tborderborder" value="{$tborderborder}"></td></tr><tr><td class="trow1"></td><td class="trow2"><input value="{$lang->d_save}" type="submit"></td></tr></table></td></tr></table></form>{$lang->d_copy} <a href="http://i-net.bplaced.net">iNet</a>{$footer}</body></html>';	foreach($new_templates as $title => $template)	{		$new_template = array(			'title'		=> $db->escape_string($title),			'template'	=> $db->escape_string($template),			'sid'		=> '-2',			'version'	=> '140',			'dateline'	=> TIME_NOW		);		$db->insert_query('templates', $new_template);	}         }function profiledesigns_deactivate(){	global $db, $mybb;	include MYBB_ROOT."/inc/adminfunctions_templates.php";        $loadstyle22 = '<style>.thead {	background: {$theadbg} ;	color: {$theadcolor};}.tborder {	background: {$tborderbg};	border: 1px solid {$tborderborder};}.trow1 {	background: {$trow1bg};        color:{$trow1color};}.trow2 {	background: {$trow2bg};        color:{$trow1color};}.profile {padding:10px;background:{$profilebg};margin-right:auto;border:{$profilebordersize} {$profilebordertyp} {$profilebordercolor};}</style>';         find_replace_templatesets("member_profile", "#".preg_quote($loadstyle22)."#i", '', 0);         find_replace_templatesets("member_profile", "#".preg_quote('<div class=profile >')."#i", '', 0);         find_replace_templatesets("member_profile", "#".preg_quote('</div>Profiledesign Mod by <a href="http://i-net.bplaced.net">iNet</a>')."#i", '{$footer}', 0);         find_replace_templatesets("usercp_nav_profile", "#".preg_quote('<div><a href="usercp.php?action=editdesign" class="usercp_nav_item usercp_nav_editsig">Design</a></div>')."#i", '', 0);         $delete_templates = array(		'usercp_editdesign'	);         foreach($delete_templates as $template)	{		$db->delete_query('templates', "title='{$template}'");	}}function profiledesigns_install(){global $db, $mybb, $lang;$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD profilebordercolor VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD profilebordertyp VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD profilebordersize VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD profilebg VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD theadbg VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD theadcolor VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD trow1bg VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD trow2bg VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD trow1color VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD trow2color VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD tborderbg VARCHAR( 7 )");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD tborderborder VARCHAR( 7 )");}function profiledesigns_is_installed(){	global $db;	if($db->field_exists('profilebg', "users"))	{		return true;	}	return false;}function profiledesigns_uninstall(){global $db;$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP profilebordercolor");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP profilebordertyp");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP profilebordersize");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP profilebg");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP theadbg");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP theadcolor");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP trow1bg");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP trow2bg");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP trow1color");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP trow2color");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP tborderbg");$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP tborderborder");}?>
(2010-01-02, 06:48 PM)ralgith Wrote: [ -> ]
(2010-01-02, 11:38 AM)Jammerx2 Wrote: [ -> ]Lol @200 hours, it should take no more than a week to create at max. Either way, too much time to spend on a free plugin. And it's not saved into templates, there would have to be extra columns in users saving their position for it.

I had originally thought he meant for Admins to be able to do it. But for each user to have it custom would mean adding a CUSTOM template field into the user table... or at least that's how I would do it.

You guys aren't reading my post. I asked for the data to be stored LOCALLY in COOKIES.

I'd make this myself but I don't know how to do the drag and drop. I'd be more than willing to help with the storing & retrieving data from the cookies.
Pages: 1 2 3