Skip to content

Commit

Permalink
BK-Multithumb 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phproberto committed Jul 24, 2012
1 parent 4062a5b commit fdc6ef3
Show file tree
Hide file tree
Showing 110 changed files with 7,091 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.buildpath
.settings/
.project
# nunca ignorar .gitignore ni index.html
!.gitignore
!index.html
!index.php
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
plg_content_multithumb
======================

Our improved BK-Multithumb plugin
Our improved BK-Multithumb plugin

Based on BL-Multithumb 3.1.0 ( http://joomla.rjews.net/bk-multithumb )
64 changes: 64 additions & 0 deletions expando.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

/* Expando Image Script ©2008 John Davenport Scheuer
as first seen in http://www.dynamicdrive.com/forums/
username: jscheuer1 - This Notice Must Remain for Legal Use
*/

if (document.images){
(function(){
var cos, a = /Apple/.test(navigator.vendor), times = a? 20 : 40, speed = a? 40 : 20;
var expConIm = function(im){
im = im || window.event;
if (!expConIm.r.test (im.className))
im = im.target || im.srcElement || null;
if (!im || !expConIm.r.test (im.className))
return;
var e = expConIm,
widthHeight = function(dim){
return dim[0] * cos + dim[1] + 'px';
},
resize = function(){
cos = (1 - Math.cos((e.ims[i].jump / times) * Math.PI)) / 2;
im.style.width = widthHeight (e.ims[i].w);
im.style.height = widthHeight (e.ims[i].h);
if (e.ims[i].d && times > e.ims[i].jump){
++e.ims[i].jump;
e.ims[i].timer = setTimeout(resize, speed);
} else if (!e.ims[i].d && e.ims[i].jump > 0){
--e.ims[i].jump;
e.ims[i].timer = setTimeout(resize, speed);
}
}, d = document.images, i = d.length - 1;
for (i; i > -1; --i)
if(d[i] == im) break;
i = i + im.src;
if (!e.ims[i]){
im.title = '';
e.ims[i] = {im : new Image(), jump : 0};
e.ims[i].im.onload = function(){
e.ims[i].w = [e.ims[i].im.width - im.width, im.width];
e.ims[i].h = [e.ims[i].im.height - im.height, im.height];
e (im);
};
e.ims[i].im.src = im.src;
return;
}
if (e.ims[i].timer) clearTimeout(e.ims[i].timer);
e.ims[i].d = !e.ims[i].d;
resize ();
};

expConIm.ims = {};

expConIm.r = new RegExp('\\bexpando\\b');

if (document.addEventListener){
document.addEventListener('mouseover', expConIm, false);
document.addEventListener('mouseout', expConIm, false);
}
else if (document.attachEvent){
document.attachEvent('onmouseover', expConIm);
document.attachEvent('onmouseout', expConIm);
}
})();
}
81 changes: 81 additions & 0 deletions fields/blogs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );


jimport('joomla.html.html');
jimport('joomla.form.formfield');//import the necessary class definition for formfield


class JFormFieldBlogs extends JFormField
{

protected $type = 'Blogs';

var $options = array();
var $menutype = '';
// $parent is the parent of the children we want to see
// $level is increased when we go deeper into the tree,
// used to display a nice indented tree

protected function getInput()
{
// Initialize variables.
$session = JFactory::getSession();
// $options = array();

$db =& JFactory::getDBO();



$query = 'SELECT #__menu.id, #__menu.title as title, #__menu.parent_id, #__menu.menutype, menutype as menutitle, link
FROM #__menu
WHERE #__menu.published=1 ORDER BY lft';


$result = $db->setQuery( $query );
$rows = $db->loadObjectList();

// display each child
foreach ($rows as $row) {
if ($row->menutype != $this->menutype) {
// $this->options[] = JHTML::_('select.optgroup', $row->menutitle ,'id','title');
$this->options[] = JHTML::_('select.option', '<OPTGROUP>', $row->menutitle, 'id', 'title' );
$this->menutype = $row->menutype;
}

if ( strpos( $row->link, "layout=blog") !== false or
strpos( $row->link, "view=frontpage") !== false ) {
$this->options[] = JHTML::_('select.option', $row->id, $row->title, 'id', 'title');
}
// echo "DEBUG: $parent, $row->id, $row->title<br>";
// call this function again to display this
// child's children
// $this->display_children($row->id, $level+1);
}

$attr = '';

// Initialize some field attributes.
$attr .= $this->element['class'] ? ' class="'.(string) $this->element['class'].'"' : '';

// To avoid user's confusion, readonly="true" should imply disabled="true".
if ( (string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true') {
$attr .= ' disabled="disabled"';
}

$attr .= $this->element['size'] ? ' size="'.(int) $this->element['size'].'"' : '5';
$attr .= $this->multiple ? ' multiple="multiple"' : '';

// Initialize JavaScript field attributes.
$attr .= $this->element['onchange'] ? ' onchange="'.(string) $this->element['onchange'].'"' : '';

// echo "DEBUG:".print_r($this->options)."<br>";
return JHTML::_('select.genericlist', $this->options, $this->name, trim($attr), 'id', 'title', $this->value );

// return JHTML::_('select.genericlist', $this->options, ''.$control_name.'['.$name.'][]', ' multiple="multiple" size="' . $size . '" class="inputbox"', 'value', 'text', $value, $control_name.$name);
}


}
?>
50 changes: 50 additions & 0 deletions fields/categories.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php
class JElementCategories extends JElement {

var $_name = 'Categories';

function fetchElement($name, $value, &$node, $control_name)
{
$db = &JFactory::getDBO();

$section = $node->attributes('section');
$class = $node->attributes('class');
if (!$class) {
$class = "inputbox";
}

if (!isset ($section)) {
// alias for section
$section = $node->attributes('scope');
if (!isset ($section)) {
$section = 'content';
}
}

$size = ( $node->attributes('size') ? $node->attributes('size') : 5 );

if ($section == 'content') {
// This might get a conflict with the dynamic translation
// - TODO: search for better solution
$query = 'SELECT c.id AS value, CONCAT_WS( "/",s.title, c.title ) AS text' .
' FROM #__categories AS c' .
' LEFT JOIN #__sections AS s ON s.id=c.section' .
' WHERE c.published = 1' .
' AND s.scope = '.$db->Quote($section).
' ORDER BY s.title, c.title';
} else {
$query = 'SELECT c.id AS value, c.title AS text' .
' FROM #__categories AS c' .
' WHERE c.published = 1' .
' AND c.section = '.$db->Quote($section).
' ORDER BY c.title';
}
$db->setQuery($query);
$options = $db->loadObjectList();

return JHTML::_('select.genericlist', $options, ''.$control_name.'['.$name.'][]',
'class="inputbox" multiple="multiple" size="'.$size.'"','value', 'text', $value, $control_name.$name);

}
}
?>
24 changes: 24 additions & 0 deletions fields/jutabssliders.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

require_once JPATH_LIBRARIES.DS.'joomla'.DS.'html'.DS.'pane.php';

class JElementSliders extends JElement {

var $_name = 'sliders';

function fetchElement($name, $default, &$xmlNode, $control_name='')
{
$text = $xmlNode->_attributes['description'];
$html = '';
$html .= '</td></tr></table>';
$html .= JPaneSliders::endPanel();
$html .= JPaneSliders::startPanel( ''.JText::_($text), $text );
$html .= '<table width="100%" class="paramlist admintable" cellspacing="1">';
$desc='';
$html .= '<tr><td class="paramlist_description">'.$desc.'</td>';
$html .= '<td class="paramlist_value">';

return $html;
}
}
?>
22 changes: 22 additions & 0 deletions fields/slider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

class JElementSlider extends JElement {

var $_name = 'slider';

function fetchElement($name, $default, &$xmlNode, $control_name='')
{
$text = $default;
$html = '';
$html .= '</td></tr></table>';
$html .= JPaneSliders::endPanel();
$html .= JPaneSliders::startPanel( ''.JText::_($text), $text );
$html .= '<table width="100%" class="paramlist admintable" cellspacing="1">';
$desc='';
$html .= '<tr><td class="paramlist_description">'.$desc.'</td>';
$html .= '<td class="paramlist_value">';

return $html;
}
}
?>
Loading

0 comments on commit fdc6ef3

Please sign in to comment.