PHP - Moved: Help With Sports Component And Module For Joomla
This topic has been moved to PHP Applications.
http://www.phpfreaks.com/forums/index.php?topic=328109.0 Similar TutorialsHI All,
I need some suggestions on how to proceed on with component development. and any logic code or similar coding will be very much appreciated.
The component should display the list of contents displaying some columns from a table(ie.,scncontent) from database similar to web links component along with the tool bar (new,edit,publish,unpublish,trash etc., actions ) and with pagination also . This component should be designed with MVC architecture. On clicking new or edit icons, a form should be opened and data should be saved or updated to database.
A joomla module have the following code which displays the date of an article, and to a seperate line the linked title of that article.
Please help me on how to change that code so that the date and the title of the article to be presented in the same line?
<div class="smartlatest-title"> <?php if($params->get('show_date',1)) echo '<div class="smartlatest-date">'.strftime($params->get('date_format','%d-%m-%Y'), strtotime($item->publish_up)).'</div>'; ?> <?php if($params->get('link_title',1)) { ?><a href="<?php echo $item->link; ?>" class="smartlatest-title-link"><?php } ?> <?php echo $item->title; ?> <?php if($params->get('link_title',1)) { ?></a><?php } ?> </div> I want to move a module, as shown in the attached jpeg. I want to move it to the position illustrated by the arrow, and I want to increase it's height so it fills the space but leaving a border. There is no module in the position that I can use, so I have to adjust the html coding (I presume). Can anyone help me with this? I have searched for help and I don't even know which file I need to change - whether it is the css or the html. Cheers, James. This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=353428.0 I have created a component with ACL which works perfectly fine. However I want to access the component ACL in the quickicon module to hide specific icons from specific usergroups.
Example:
JFactory::getUser()->authorise('partner.create.order', 'com_partner_portal')This doesn't seem to work in the mod_quickicon module. Any ideas how I can get this to work? I tried joomla forums, stackoverflow and the IRC channel with no success. This is kind of my last resort other than hard coding the usergroup id's in the module This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=306933.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=314053.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=346951.0 I would like to publish the sports standings (MLB, NHL, NFL, NBA) on a client website. I have not been able to find an RSS feed for standings from any of the leagues themselves. There are "widgets" and "Google gadgets" that do it but they don't look very good and they don't allow me to format them very well. Is there a way for me to grab the standings from a web page using PHP? Or does anyone know of a source that provides this information via RSS? Thank you! I can't seem to find a tutorial on basics of making a module based php system. Like how to fetch and execute the module. This is a node voting module I created and it has a slight problem that I cannot figure out. It's supposed to be a simple 'Vote Up' or 'Vote Down' feature. You click 'Vote Up' and one appears in your vote tally. You click 'Vote Down' and your original vote tally is subtracted by one back down to zero. When it goes back to zero, it gets stuck there. It stays on zero no matter if I choose 'Vote Up' or 'Vote Down' again. There's something that's happening when I move my vote tally back down to zero. Maybe something isn't setup correctly with the $current_votes variable. I don't know. I've been at this for hours. Here's the code: <?php function bonnier_vote_perm() { return array('vote on content'); } function bonnier_vote_menu() { $items = array(); $items['vote'] = array( 'title' => 'vote', 'page callback' => 'bonnier_vote_vote', 'access arguments' => array('vote on content'), 'type' => MENU_CALLBACK, ); return $items; } function bonnier_vote_vote() { $nid = $_REQUEST['nid']; $value = $_REQUEST['votes']; $current_votes = db_result(db_query("SELECT votes FROM bonnier_vote WHERE nid = $nid")); if ($current_votes) { $new_votes = $current_votes + $value; db_query("UPDATE bonnier_vote SET votes = $new_votes WHERE nid = $nid"); } else { db_query("INSERT INTO bonnier_vote (nid, votes) VALUES ($nid, $value)"); } drupal_set_message('Your vote has been recorded'); drupal_goto('node/'.$nid); } function bonnier_vote_nodeapi(&$node, $op, $teaser = null, $page = null) { if ($op == 'view' && !$teaser) { $votes = db_result(db_query("SELECT votes FROM bonnier_vote WHERE nid = {$node->nid}")); if (!$votes) { $votes = 0; } $widget = '<div>'; $widget .= l('Vote Up', 'vote', array('query' => array('nid' => $node->nid, 'votes' => 1))); $widget .= ' '; $widget .= l('Vote Down', 'vote', array('query' => array('nid' => $node->nid, 'value' => -1))); $widget .= ' '; $widget .= 'Sco '. $votes; $widget .= '</div>'; $node->content['vote_widget'] = array( '#value' => $widget, '#weight' => -10, ); } } Any bit of advice would be much appreciated. How do I check in PHP if something like the GD library is installed on a server? I am going to be making a thumbnailing system and the user can install the app on their server. If they have the GD library, continue with making thumbnails, else show a default thumbnail. Hello,
First time asking technical question in a forum so I beg pardon for errors.
I have a third party blog module installed on opencart. The original coder helped me to fix some bugs, but he is not answering anymore to emails.
I would like to add a simple pagination to the "latest articles" part, because at the moment the website display the exact number declared in "article limit" and does not show pagination if articles shown are less than the total.
the code from "article_by_type.php" line 85 is the following:
/*recent_article*/ if ($setting['article_type']=='recent_article') { $data = array( 'sort' => 'p.date_added', 'order' => 'DESC', 'start' => 0, 'limit' => $article_limit ); $articles = $this->model_news_article->getArticles($data); }another file "article_list.php" at line 88 and 214 already have pagination: $this->data['article_ajax_load'] = $this->getArticle($article_category_id,$page,$limit,$description_limit);can anyone help add pagination to "article_by_type.php" or adapt the existing pagination code to it ? Attached Files article_by_type.php 6.23KB 0 downloads article_list.php 10.2KB 0 downloads Created module like No other products add to cart if restricted product available in cart and vice versa. My Module : app/etc/modules/Brst_Test.xml<?xml version="1.0"?> <config> <modules> <Brst_Test> <active>true</active> <codePool>community</codePool> </Brst_Test> </modules> </config> This is my observer file app/code/community/Brst/Test/Model/Observer.php<?php ini_set('display_errors', '1'); // Mage::log('Hy observer called', null, 'logfile.log'); class Brst_Test_Model_Observer { //Put any event as per your requirement public function logCartAdd() { $product = Mage::getModel('catalog/product') ->load(Mage::app()->getRequest()->getParam('product', 0)); $cart_qty = (int) Mage::getModel('checkout/cart')->getQuote()->getItemsQty(); if ($product->getId()==31588 && cart_qty > 0) { Mage::throwException("You can not add This special Product, empty cart before add it"); } // $quote = Mage::getSingleton('checkout/session')->getQuote(); // if ($quote->hasProductId(2)) //{ // Mage::getSingleton("core/session")->addError("Cart has Special Product you can not add another"); // return; // } $quote = Mage::getModel('checkout/cart')->getQuote(); foreach ($quote->getAllItems() as $item) { $productId = $item->getProductId(); if($productId==31588){ Mage::throwException("Cart has Special Product you can not add another"); } } } } ?> app/code/community/Brst/Test/etc/config.xml <?xml version="1.0"?> <config> <modules> <Brst_Test> <version>0.1.0</version> </Brst_Test> </modules> <global> <models> <brst_test> <class>Brst_Test_Model</class> </brst_test> </models> </global> <frontend> <events> <controller_action_predispatch_checkout_cart_add> <observers> <brst_test_log_cart_add> <class>brst_test/observer</class> <method>logCartAdd</method> </brst_test_log_cart_add> </observers> </controller_action_predispatch_checkout_cart_add> </events> </frontend> </config>
Not working, how to solve the error? hello dear linux-community if a server needs to meed some requirements - eg for installation wordpress and if the server needs to run eg see he https://wordpress.or...t/requirements/ PHP 5.2.4 or greater MySQL 5.0 or greater The mod_rewrite Apache module then i need to have a closer look at the apache2handler in the php-ini Apache Version Apache Loaded Modules core mod_so http_core mod_authn_file mod_authn_core mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_core mod_access_compat mod_auth_basic mod_auth_digest mod_socache_shmcb mod_watchdog mod_ratelimit mod_reqtimeout mod_filter mod_deflate mod_mime mod_log_config mod_env mod_mime_magic mod_expires mod_headers mod_usertrack mod_setenvif mod_version mod_session mod_session_cookie mod_ssl prefork mod_unixd mod_status mod_autoindex mod_dir mod_alias mod_php5 all the mentioned are listed in the php-info.file note: here are no mod_rewrite Apache module so what I have problem with PHP module for meta search engine, this module takes image results from google and sends it to meta search engine as a result. But it is not working, there is a problem in PHP code witch i have no idea how to find and fix. Code: [Select] <?php class image_google { function image_google() { $this->profile = array( 'site_name' => 'Google', 'site_url' => 'http://www.google.com', 'request_url' => 'http://www.google.com/search?q=$e_qry_str&site=images&tab=wi&start='.(20*($_REQUEST['d']-1)), ); } function parse_results(&$output) { #echo $output; # debug $results = array(); if(preg_match_all('{imgurl=(.*?)&imgrefurl=(.*?)&}is',html_compress(remove_code($output)),$matches,PREG_SET_ORDER)) { $last_match = ''; foreach($matches as $r) { $result = array( 'real_url' => html_decode($r[2]), 'follow_url' => html_decode($r[1]), 'image_url' => html_decode($r[1]), 'title' => html_decode($r[1]), 'description' => html_decode($r[1]), ); array_push($results,$result); $last_match = &$r[0]; } if($last_match) { $offset = strpos($output,$last_match)+strlen($last_match); $output = substr($output,$offset); } } #var_export($results); # debug return $results; } } ?> Hello all,
I have a question. The server I am currently working on is on PHP 5.2 and Joomla 1.5.26. I'd like to migrate or slowly move over to 3.0 on the same server however 3.0 requires at least 5.3 (would go to 5.4). In my cpanel, it tells me "PHP 5.4+ Incompatible Applications Installed". Is it not possible to run Joomla 1.5 on PHP 5.4, or are there certain components/modules that do not work with it?
The two major third party components I have installed are Community Builder and Jumi.
I just don't want my site to explode if I click the button.
Thanks,
Rob
Edited by Spikes, 10 November 2014 - 10:21 PM. Hey guys, Anyone who's used Joomla will know they have a very snazzy system for allowing the user to reorder the "order" field in any given table. You know the one, the blue arrows pointing up and down to move the row up or down. I wanna implement something similar in my own sites CMS, does anyone know a good script to handle it? Hello, Hi ,
My site gives a blank page when i click on an article due to insufficient memory. I tried making changes to the php.ini file but the changes are not getting reflected.
Please advice if a server restart is needed for this, how do i go about it?
Thanks in advance
|