cfrank35 Posted December 13, 2012 Share Posted December 13, 2012 Hy friends im completely new to php. I want to modify this php code: In the red marked part php make in a div the title as a ancor, I would like to make although the same ancor for the content in the blue marked part. Can someone help me. Im completely new to php. <?php /** * @package Sj Content Cool Showcase * @version 2.5 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL * @copyright © 2012 YouTech Company. All Rights Reserved. * @author YouTech Company http://www.procycle.com * */ defined('_JEXEC') or die; ?> <?php if(!empty($list)) { $options=$params->toObject(); $image_config = array( 'output_width' => $options->item_image_width, 'output_height' => $options->item_image_height, 'function' => $options->item_image_function, 'background' => $options->item_image_background ); $uniquied='sj-content-cool-showcase'.rand().time(); ?> <div class="sj-cool-showcase" id="<?php echo $uniquied; ?>"> <!--Begin sj-cool-showcase--> <?php if(!empty($options->pretext)) { ?> <div class="pretext" > <?php echo $options->pretext; ?> </div> <?php } ?> <div class="csc-wap <?php echo $options->theme ?> <?php echo $options->direction_display_when ?>"> <!--Begin csc-wap--> <div class="csc-container"> <!--Begin csc-container--> <?php foreach($list as $item) { ?> <div class="csc-item"> <!--Begin csc-item--> <div class="csc-item-inner" > <img src="<?php echo YTools::resize($item->image,$image_config); ?>" alt="<?php echo $item->title; ?>" /> <?php if($options->item_border_image==1) { ?> <span class="csc-image-border-small" ></span> <span class="csc-image-border-large" ></span> <?php } ?> <?php if($options->item_title_display==1|| $options->item_desc_display==1) { ?> <div class="csc-content"> <div class="csc-content-background"></div> <div class="csc-content-inner"> <?php if($options->item_title_display==1) { ?> <div class="csc-item-title"> <?php if($options->item_title_linkable==1) { ?> <a href="<?php echo $item->url; ?>" <?php echo YTools::parseTarget($options->item_link_target);?> title="<?php echo $item->title; ?>"> <?php echo YTools::truncate($item->title,$options->item_title_max_character); ?> </a> <?php } else { ?> <span> <?php echo YTools::truncate($item->title,$options->item_title_max_character); ?> </span> <?php } ?> </div> <?php } ?> <?php if($options->item_desc_display==1) { ?> <div class="csc-item-description"> <?php if ( (int)$params->get('item_description_striptags', 1) ){ $keep_tags = $params->get('item_description_keeptags', ''); $keep_tags = str_replace(array(' '), array(''), $keep_tags); $tmp_desc = strip_tags($item->description ,$keep_tags ); echo YTools::truncate($tmp_desc, (int)$params->get('item_desc_max_character')); } else { echo YTools::truncate($item->description, (int)$params->get('item_desc_max_character')); } ?> </div> <?php } ?> </div> </div> <?php } ?> <div class="clear"></div> </div> <div class="clear"></div> </div> <!--End csc-container--> <?php }?> </div> <!--End csc-container--> <div class="clear"></div> </div> <!--End csc-wap--> <?php if(!empty($options->posttext)) { ?> <div class="pretext" style="width:<?php echo $options->width_module ?>px;" > <?php echo $options->posttext; ?> </div> <?php } ?> </div> <!--End sj-cool-showcase--> <?php /*-- css --*/ ob_start(); ?> #<?php echo $uniquied; ?>{ width:<?php echo $options->width_module; ?>px; } #<?php echo $uniquied; ?> div.csc-wap{ width:<?php echo $options->width_module; ?>px; height:<?php echo ($options->theme=='theme1' || $options->theme=='theme2')?($options->item_image_height + 88)$options->height_module);?>px; } <?php if($options->item_border_image==1) {?> #<?php echo $uniquied; ?> div.csc-wap div.csc-item.on-top div.csc-item-inner div.csc-content { bottom:6px; right:6px; left:6px; display:block; } <?php } else {?> #<?php echo $uniquied; ?> .csc-wap .csc-item .csc-item-inner img{ -webkit-border-radius:0px; -moz-border-radius:0px; border-radius:0px; } <?php } ?> <?php $style_sheet = ob_get_contents(); @ob_end_clean(); $document = &JFactory::getDocument(); $document->addStyleDeclaration($style_sheet); ?> <script type="text/javascript"> //<![CDATA[ $jsmart(document).ready(function($){ $('#<?php echo $uniquied ?> .csc-wap').procycle({ nextprev:<?php echo (count($list)<=1)?0:$options->directionNav ?>, numeric:<?php echo (count($list)<=1)?0:$options->buttonNav ?>, mouse:<?php echo (count($list)<=1)?0:$options->mouse_wheel ?>, slideWidth:<?php echo $options->width_module ?>, slideHeight:<?php echo($options->theme=='theme1' || $options->theme=='theme2')?($options->item_image_height +45)$options->height_module - 43);?>, imageWidth:<?php echo $options->item_image_width ?>, imageHeight:<?php echo $options->item_image_height?>, theme:'<?php echo $options->theme ?>', distance:<?php echo $options->distance?>, slidesPerScroll:<?php echo (count($list)>=$options->slidesPerScroll)?$options->slidesPerScroll:count($list); ?>, autoplay:<?php echo $options->autoplay ?>, pauseOnHover:<?php echo $options->pauseOnHover ?>, autoplayInterval:<?php echo $options->autoplayInterval; ?>, speed:500, shadow:<?php echo ($options->theme=='theme1' || $options->theme=='theme2')?($options->shadow):0 ;?>, style_nextprev:'<?php echo $options->style_directionNav; ?>' }); }); //]]> </script> <?php } else { echo JText::_('Has no content to show!');} ?> defaultbackup.php Link to comment https://forums.phpfreaks.com/topic/271962-coding-help-newbie/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.