Jump to content

Search the Community

Showing results for tags 'joomla 2.5'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 4 results

  1. Hello, I am using a component for joomla 2.5 but i hit snag where it comes to selecting the categories from a drop down box in the front end. I want to use the disabled element for the top category options so that they are visible but unselectable. Something like this: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option_disabled The component uses the following code to hide certain categories of my choosing but i don't want to hide them i just want to add the HTML element "disabled" to the corresponding options: $options = JHTML::_('category.options','com_content',array('filter.published' => 1 )); require_once(JPATH_COMPONENT_SITE.DS.'config'.DS.'restrictions.php'); $myGroups = $acl->getGroupsByUser($my->id,false); foreach($myGroups as $gid) { if(isset($groupRestrictions[$gid])) { foreach($options as $k=>$option) { if(in_array( $option->value, $groupRestrictions[$gid] )) { unset($options[$k]); } } } } $opt = array('value'=>0,'text'=>JText::_('JOPTION_SELECT_CATEGORY')); array_unshift($options,$opt); return JHTML::_('select.genericlist',$options,'catid',"class='inputbox'",'value','text',$categoryId); } Any help is gratefully appreciated.
  2. I'm still pretty new at this but I want to learn... I have a GPL plugin (for Joomla 1.6 / JomSocial 2.6) that I would like to use (w/ Joomla 2.5 & JomSocial 2.8 ) but it will need some fixing or updating. It should check for a default avatar and replace it with a random one. It installed but doesn't work. How can I verify it's getting the data it needs? I think one problem might be no file listed in the database is default. It looks like this plugin expects one to be there. The script is only about 100 lines so I hope someone can point out some obvious problems. Thanks for looking and any help you can offer. // no direct access defined('_JEXEC') or die('Restricted access'); jimport( 'joomla.plugin.plugin' ); require_once( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php'); class plgUserMiniSocialGender extends JPlugin { function plgUserMiniSocialGender(& $subject, $config) { parent::__construct($subject, $config); } //function onLoginUser($user, $options) function onUserLogin($user, $options) { //$juser = $this->getJomSocialUser($user); $juser = CFactory::getUser($userid); //$curavatar = $juser->getAvatar(); $curavatar = $juser->getThumbAvatar(); $gender = $juser->getInfo($this->params->get( 'genderfield' , 'FIELD_GENDER' )); //$gender = $user->getInfo('FIELD_GENDER'); if($this->compareEnd("default.jpg", $curavatar) || $this->compareEnd("user.png", $curavatar) || ($this->contains('minisocialgender_images',$curavatar) && $this->params->get( 'reassign' , '0' ))) { if($gender) { $maleurl = JPATH_SITE . DS . 'plugins' . DS . 'user' . DS . 'minisocialgender' .DS . 'minisocialgender_images' . DS . 'male' . DS; $femaleurl = JPATH_SITE . DS . 'plugins' . DS . 'user' . DS . 'minisocialgender' .DS . 'minisocialgender_images' . DS . 'female' . DS; $usermodel =& CFactory::getModel('user'); if($this->params->get( 'maletype' , 'Male' ) == $gender) { if($this->contains("male", $curavatar)) return; } if($this->params->get( 'femaletype' , 'Female' ) == $gender) { if($this->contains("female", $curavatar)) return; } if($gender == $this->params->get( 'maletype' , 'Male' )) { $files = $this->getDirItems($maleurl); $random = rand ( 0 , (count( $files) - 1)); JFile::copy($maleurl . $files[$random], JPATH_SITE . DS . 'plugins' . DS . 'user' . DS .'minisocialgender' .DS . 'minisocialgender_images' . DS . $juser->id . 'male' . '.png'); JFile::copy($maleurl . 'thumb' . DS .$files[$random], JPATH_SITE . DS . 'plugins' . DS . 'user' . DS . 'minisocialgender' .DS . 'minisocialgender_images' . DS . 'thumb' . $juser->id . 'male' . '.png'); $usermodel->setImage($juser->id, 'plugins' . DS . 'user' . DS . 'minisocialgender' .DS . 'minisocialgender_images' . DS . $juser->id . 'male' . '.png', 'avatar'); $usermodel->setImage($juser->id, 'plugins' . DS . 'user' . DS . 'minisocialgender' .DS . 'minisocialgender_images' . DS . 'thumb' . $juser->id . 'male' . '.png', 'thumb'); } elseif($gender == $this->params->get( 'femaletype' , 'Female' )) { $files = $this->getDirItems($femaleurl); $random= rand ( 0 , (count( $files) - 1) ); JFile::copy($femaleurl . $files[$random], JPATH_SITE . DS . 'plugins' . DS . 'user' . DS . 'minisocialgender' .DS . 'minisocialgender_images' . DS . $juser->id . 'female' . '.png'); JFile::copy($femaleurl . 'thumb' . DS . $files[$random], JPATH_SITE . DS . 'plugins' . DS . 'minisocialgender' .DS . 'user' . DS . 'minisocialgender_images' . DS . 'thumb' . $juser->id . 'female' . '.png'); $usermodel->setImage($juser->id, 'plugins' . DS . 'user' . DS . 'minisocialgender' .DS . 'minisocialgender_images' . DS . $juser->id . 'female' . '.png', 'avatar'); $usermodel->setImage($juser->id, 'plugins' . DS . 'user' . DS . 'minisocialgender' .DS . 'minisocialgender_images' . DS . 'thumb' . $juser->id . 'female' . '.png', 'thumb'); } if($this->params->get( 'warnuser' , 1 )) { JFactory::getApplication()->enqueueMessage( $this->params->get( 'warnmessage' )); } } } } function getDirItems($dir) { $files = array(); if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if(filetype($dir . $file) == "file") { $files[] = $file; } } closedir($dh); } } return $files; } function compareEnd($end, $fullstring) { $StrLen = strlen($end); $FullStrEnd = substr($fullstring, strlen($fullstring) - $StrLen); return ($end == $FullStrEnd); } function contains($needle, $haystack) { $pos = strpos($haystack,$needle); if($pos) return true; else return false; } //function getJomSocialUser($user) //{ // $user2 =& JFactory::getUser(); // $userid = $user2->id; // return CFactory::getUser($userid); //} }
  3. Hi I have a several php files which actually is a registration form with validation. So if someone fills up the form correctly, the values will be stored into database. When I am running the file, the form field displays but it has no functionality. I don't know exactly what is the mistake I have made? The web url is the following if you would like to have a look: http://bphf2012.org/index.php?option=com_jumi&fileid=11 The files can be seen from here: https://www.dropbox.com/sh/vof0p4heo4csdn9/dj2NfgcWuE Thanks.
  4. Hi I have created multiple php pages and the pages are calling other pages using require_once or include function. When I run the main script, it is showing the following error: Warning: include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/content/13/10377813/html/components/com_jumi/views/application/view.html.php(38) : eval()'d code on line 13 Warning: include( http://bphf2012.org/index.php?option=com_jumi&fileid=10 ) [function.include]: failed to open stream: no suitable wrapper could be found in /home/content/13/10377813/html/components/com_jumi/views/application/view.html.php(38) : eval()'d code on line 13 Warning: include() [function.include]: Failed opening 'http://bphf2012.org/index.php?option=com_jumi&fileid=10' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in /home/content/13/10377813/html/components/com_jumi/views/application/view.html.php(38) : eval()'d code on line 13 Could anyone please help me how to sort out the issue... Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.