Jump to content

judah

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by judah

  1. Sorry, I'm in South Africa so time zones will be different. I looked at page source and this is what I found: <div><a href="http://http://www.amazon.com/Still-Running-BookStrand-Publishing-Judah/dp/1606012134/ref=la_B0032ZVHUM_1_3?s=books&ie=UTF8&qid=1380896274&sr=1-3?tag=romautjudrai-20" target="_blank"><img src='http://classicromancerevival.com/images/library/amazon.png'></a> <a href="http://www.amazon.com/Still-Running-BookStrand-Publishing-Judah/dp/1606012134/ref=la_B0032ZVHUM_1_3?s=books&ie=UTF8&qid=1380896274&sr=1-3" target="_blank" rel="nofollow"> http://www.amazon.com/Still-Running-BookStrand-Publishing-Judah/dp/1606012134/ref=la_B0032ZVHUM_1_3?s=books&ie=UTF8&qid=1380896274&sr=1-3 </a> </div> To me it looks like it's putting the url in twice? The url of the article output is : http://classicromancerevival.com/library/user-item/506-judah-raine/1-still-running
  2. So I'm nothing if not persistent (and utterly desperate) I have really tried to resolve this myself, and thus far have managed to get rid of all the above errors, and I've got the image to display finally. However, the image displays as a link (which goes to : The requested URL /www.amazon.com/Still-Running-BookStrand-Publishing-Judah/dp/1606012134/ref=la_B0032ZVHUM_1_3 was not found on this server. the actual link entered on the submission form displays next to the image. If I click on it, it goes to the correct page. The link, however, does not include the amazon associate tag when it displays. I'm utterly at my wits' end here, and cannot even begin to say how much I would appreciate some help to resolve this. I've been at it for weeks, with no luck at all. The code again is: <?php $value = $this->value; $options = $this->params->get('params.open_url', 1) ? ' target="_blank"' : ''; echo JHtml::link('http://' .$value[0]['url'].'?tag=romautjudrai-20', "<img src='".JURI::root()."images/library/amazon.png'>", $options ) ; ?> In summary, the url is added in a submission form. I need the link displayed as an image with the affiliate code automagically added. The code above is one I used before, but which now will not work, no matter what I do. Thanks, Jude
  3. I set system error to developer, and found the following: Notice: Undefined offset: 13 in /home/classicr/public_html/components/com_cobalt/views/record/tmpl/default_record_library.php on line 427 Notice: Trying to get property of non-object in /home/classicr/public_html/components/com_cobalt/views/record/tmpl/default_record_library.php on line 427 Notice: Undefined offset: 5 in /home/classicr/public_html/components/com_cobalt/views/record/tmpl/default_record_library.php on line 428 Notice: Trying to get property of non-object in /home/classicr/public_html/components/com_cobalt/views/record/tmpl/default_record_library.php on line 428 The row numbers correspond with the two links I'm trying to generate. I'd appreciate it if someone could point me in the right direction here. I have run the code through various php checkers and it came back with no errors. Many thanks, Jude
  4. Nope, that didn't fix it, but thanks so much anyway
  5. Oh, won't I just be so irritated if this was the problem and I missed it all the while... thanks, I'll have a look.
  6. Hi there, so sorry to bug you but I have run into an issue I cannot seem to solve. I have a submission form into which my author's add their book buy links at Amazon, B and N (Linkshare) and Smashwords. This is a pre-defined form input, the field type in question set as "url". The url then displays as an image (pre-defined in the output) link with my affiliate code automatically added via the output template. I had saved this template previously but now, when I add it, the links display as never ending text (with link) not image, and the links include all the affiliate information. The particular lines of code are: <?php $value = $this->value; $options = $this->params->get('params.open_url', 1) ? ' target="_blank"' : ''; echo JHtml:: link('http://' . $value[0]['url'].'?tag=romautjudrai-20', "<img src='".JURI::root()."images/library/amazon.png'", $options ) ; ?> I have poured over the this a gazillion times and for the life of me cannot find an error. I would greatly appreciate any and all assistance, thank you. File attached. Jude amazon.php
  7. We did, and I cannot tell you what a relief this is!
  8. Many thanks, I will give that a try. And yes, I am (dreadfully) new to php and so everything is hard work and a headache, though I only ask for help when I've confused myself beyond redemption In my defense, though, the only change I have made to the code is the inclusion of the table. The rest is as per the original template, so it is some comfort to know that others with much more experience occasionally miss the odd ?> i spend most of my time unraveling my confusion and working by trial and error. Not the best, and I have promised myself to find the time to make a concerted study of php before I die of old age. If nothing else, it will save me a lot of time, and others an equal amount of amusement. I have learned to laugh at myself. Final note: What I did find, after making the change and still having a problem with calling something that had previously been called (didn't copy and paste the error message) was that a section of code had been duplicated. I have finally resolved this, and could not have done this without input from those who offered help. Thank you so very much for your time and patience, Jude
  9. Attached Thank you default_record_library.php
  10. The very first one: <?php echo $this->loadTemplate('tags');?>
  11. I've done the correction as per #7, but but now get error: Parse error: syntax error, unexpected '<' in /home/classicr/public_html/components/com_cobalt/views/record/tmpl/default_record_library.php on line 639 It does have to do with the "chunk" of code. I have gone back to the original default template and copied this code (which I have not changed at all) as follows: <?php echo $this->loadTemplate('tags');?> <?php if($category || $author || $details || $params->get('tmpl_core.item_rating')): ?> <div class="well article-info"> <div class="row-fluid"> <?php if($params->get('tmpl_core.item_rating')):?> <div class="span2"> <?php echo $item->rating;?> </div> <?php endif;?> <div class="span<?php echo ($params->get('tmpl_core.item_rating') ? 8 : 10);?>"> <small> <dl class="dl-horizontal user-info"> <?php if($category):?> <?php echo implode(' ', $category);?> <?php endif;?> <?php if($author):?> <dt><?php echo JText::_('Posted');?></dt> <dd> <?php echo implode(', ', $author);?> </dd> <?php endif;?> <?php if($details):?> <dt>Info</dt> <dd class="hits"> <?php echo implode(', ', $details);?> </dd> <?php endif;?> </dl> </small> </div> <?php if($params->get('tmpl_core.item_author_avatar')):?> <div class="span2 avatar"> <img src="<?php echo CCommunityHelper::getAvatar($item->user_id, $params->get('tmpl_core.item_author_avatar_width', 40), $params->get('tmpl_core.item_author_avatar_height', 40));?>" /> </div> <?php endif;?> </div> </div> <?php endif;?> </article> <?php if($started):?> <script type="text/javascript"> <?php if(in_array($params->get('tmpl_params.item_grouping_type', 0), array(1))):?> jQuery('#tabs-list a:first').tab('show'); <?php elseif(in_array($params->get('tmpl_params.item_grouping_type', 0), array(2))):?> jQuery('#tab-main').collapse('show'); <?php endif;?> </script> <?php endif;?> <?php function group_start($data, $label, $name) { static $start = false; switch ($data->tmpl_params['record']->get('tmpl_params.item_grouping_type', 0)) { //tab case 1: if(!$start) { echo '<div class="tab-content" id="tabs-box">'; $start = TRUE; } echo '<div class="tab-pane" id="'.$name.'">'; break; //slider case 2: if(!$start) { echo '<div class="accordion" id="accordion2">'; $start = TRUE; } echo '<div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#'.$name.'"> '.$label.' </a> </div> <div id="'.$name.'" class="accordion-body collapse"> <div class="accordion-inner">'; break; // fieldset case 3: echo "<legend>{$label}</legend>"; break; } } function group_end($data) { switch ($data->tmpl_params['record']->get('tmpl_params.item_grouping_type', 0)) { case 1: echo '</div>'; break; case 2: echo '</div></div></div>'; break; } } function total_end($data) { switch ($data->tmpl_params['record']->get('tmpl_params.item_grouping_type', 0)) { //tab case 1: echo '</div>'; break; case 2: echo '</div>'; break; } } I'm looking at it, but cannot for the life of me see any unexpected "<" - maybe I'm just losing my mind here in my corner..... Thanks, Jude
  12. Thank you for trying, I appreciate it. I have asked one of the fellows on the cobalt forum to spare me a moment and look, perhaps he will find something.
  13. <?php /** * Cobalt by MintJoomla * a component for Joomla! 1.7 - 2.5 CMS (http://www.joomla.org) * Author Website: http://www.mintjoomla.com/ * @copyright Copyright (C) 2012 MintJoomla (http://www.mintjoomla.com). All rights reserved. * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html */ defined('_JEXEC') or die(); $item = $this->item; $params = $this->tmpl_params['record']; $icons = array(); $category = array(); $author = array(); $details = array(); $started = FALSE; $i = $o = 0; ?> <style> .dl-horizontal dd { margin-bottom: 10px; } .tag_list li { display: block; float:left; list-style-type: none; margin-right: 5px; } .tag_list li#tag-first { line-height: 30px; } .tag_list li * { margin: 0px; padding: 0px; line-height: 30px; } .tag_list li a { color: #000; text-decoration: none; border: 1px solid #445D83; background-color: #F2F8FF; border-radius: 8px; padding: 5px 10px 5px 10px; } .tag_list li a:HOVER { color: #000; text-decoration: underline; } .line-brk { margin-left: 0px !important; } <?php echo $params->get('tmpl_params.css');?> </style> <?php if($params->get('tmpl_core.item_categories') && $item->categories_links) { $category[] = sprintf('<dt>%s<dt> <dd>%s<dd>', (count($item->categories_links) > 1 ? JText::_('CCATEGORIES') : JText::_('CCATEGORY')), implode(', ', $item->categories_links)); } if($params->get('tmpl_core.item_user_categories') && $item->ucatid) { $category[] = sprintf('<dt>%s<dt> <dd>%s<dd>', JText::_('CUCAT'), $item->ucatname_link); } if($params->get('tmpl_core.item_author') && $item->user_id) { $a[] = JText::sprintf('CWRITTENBY', CCommunityHelper::getName($item->user_id, $this->section)); if($params->get('tmpl_core.item_author_filter')) { $a[] = FilterHelper::filterButton('filter_user', $item->user_id, NULL, JText::sprintf('CSHOWALLUSERREC', CCommunityHelper::getName($item->user_id, $this->section, array('nohtml' => 1))), $this->section); } $author[] = implode(' ', $a); } if($params->get('tmpl_core.item_ctime')) { $author[] = JText::sprintf('CONDATE', JHtml::_('date', $item->created, $params->get('tmpl_core.item_time_format'))); } if($params->get('tmpl_core.item_mtime')) { $author[] = JText::_('CMTIME').': '.JHtml::_('date', $item->modify, $params->get('tmpl_core.item_time_format')); } if($params->get('tmpl_core.item_extime')) { $author[] = JText::_('CEXTIME').': '.($item->expire ? JHtml::_('date', $item->expire, $params->get('tmpl_core.item_time_format')) : JText::_('CNEVER')); } if($params->get('tmpl_core.item_type')) { $details[] = sprintf('%s: %s %s', JText::_('CTYPE'), $this->type->name, ($params->get('tmpl_core.item_type_filter') ? FilterHelper::filterButton('filter_type', $item->type_id, NULL, JText::sprintf('CSHOWALLTYPEREC', $this->type->name), $this->section) : NULL)); } if($params->get('tmpl_core.item_hits')) { $details[] = sprintf('%s: %s', JText::_('CHITS'), $item->hits); } if($params->get('tmpl_core.item_comments_num')) { $details[] = sprintf('%s: %s', JText::_('CCOMMENTS'), CommentHelper::numComments($this->type, $this->item)); } if($params->get('tmpl_core.item_favorite_num')) { $details[] = sprintf('%s: %s', JText::_('CFAVORITED'), $item->favorite_num); } if($params->get('tmpl_core.item_follow_num')) { $details[] = sprintf('%s: %s', JText::_('CFOLLOWERS'), $item->subscriptions_num); } ?> <article class="<?php echo $this->appParams->get('pageclass_sfx')?><?php if($item->featured) echo ' article-featured' ?>"> <?php if(!$this->print):?> <div class="pull-right controls"> <div class="btn-group"> <?php if($params->get('tmpl_core.item_print')):?> <a class="btn btn-mini" onclick="window.open('<?php echo JRoute::_($this->item->url.'&tmpl=component&print=1');?>','win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no'); return false;"> <?php echo HTMLFormatHelper::icon('printer.png', JText::_('CPRINT')); ?></a> <?php endif;?> <?php if($this->user->get('id')):?> <?php echo HTMLFormatHelper::bookmark($item, $this->type, $params);?> <?php echo HTMLFormatHelper::follow($item, $this->section);?> <?php echo HTMLFormatHelper::repost($item, $this->section);?> <?php if($item->controls):?> <a href="#" data-toggle="dropdown" class="dropdown-toggle btn btn-mini"> <?php echo HTMLFormatHelper::icon('gear.png'); ?></a> <ul class="dropdown-menu"> <?php echo list_controls($item->controls);?> </ul> <?php endif;?> <?php endif;?> </div> </div> <?php else:?> <div class="pull-right controls"> <a href="#" class="btn btn-mini" onclick="window.print();return false;"><?php echo HTMLFormatHelper::icon('printer.png', JText::_('CPRINT')); ?></a> </div> <?php endif;?> <?php if($params->get('tmpl_core.item_title')):?> <?php if($this->type->params->get('properties.item_title')):?> <div class="page-header"> <<?php echo $params->get('tmpl_params.title_tag', 'h1')?>> <?php echo $item->title?> <?php echo CEventsHelper::showNum('record', $item->id);?> </<?php echo $params->get('tmpl_params.title_tag', 'h1')?>> </div> <?php endif;?> <?php endif;?> <div class="clearfix"></div> <?php if(isset($this->item->fields_by_groups[null])):?> <dl class="dl-horizontal fields-list"> <?php foreach ($this->item->fields_by_groups[null] as $field_id => $field):?> <dt id="<?php echo 'dt-'.$field_id; ?>" class="<?php echo $field->fieldclass;?>"> <?php if($field->params->get('core.show_lable') > 1):?> <label id="<?php echo $field->id;?>-lbl"> <?php echo $field->label; ?> <?php if($field->params->get('core.icon')):?> <?php echo HTMLFormatHelper::icon($field->params->get('core.icon')); ?> <?php endif;?> </label> <?php if($field->params->get('core.label_break') > 1):?> <?php endif;?> <?php endif;?> </dt> <dd id="<?php echo 'dd-'.$field_id; ?>" class="<?php echo $field->fieldclass;?><?php echo ($field->params->get('core.label_break') > 1 ? ' line-brk' : NULL) ?>"> <?php echo $field->result; ?> </dd> <?php endforeach;?> </dl> <?php unset($this->item->fields_by_groups[null]);?> <?php endif;?> <?php if(in_array($params->get('tmpl_params.item_grouping_type', 0), array(1)) && count($this->item->fields_by_groups)):?> <div class="clearfix"></div> <div class="tabbable <?php echo $params->get('tmpl_params.tabs_position'); ?>"> <ul class="nav <?php echo $params->get('tmpl_params.tabs_style', 'nav-tabs'); ?>" id="tabs-list"> <?php if(isset($this->item->fields_by_groups)):?> <?php foreach ($this->item->fields_by_groups as $group_id => $fields) :?> <li><a href="#tab-<?php echo $o++?>" data-toggle="tab"> <?php echo HTMLFormatHelper::icon($item->field_groups[$group_id]['icon'])?> <?php echo JText::_($group_id)?></a></li> <?php endforeach;?> <?php endif;?> </ul> <?php endif;?> <?php if(isset($this->item->fields_by_groups)):?> <?php foreach ($this->item->fields_by_groups as $group_name => $fields) :?> <?php $started = true;?> <?php group_start($this, $group_name, 'tab-'.$i++);?> <dl class="dl-horizontal fields-list fields-group<?php echo $i;?>"> <?php foreach ($fields as $field_id => $field):?> <dt id="<?php echo 'dt-'.$field_id; ?>" class="<?php echo $field->fieldclass;?>"> <?php if($field->params->get('core.show_lable') > 1):?> <label id="<?php echo $field->id;?>-lbl"> <?php echo $field->label; ?> <?php if($field->params->get('core.icon')):?> <?php echo HTMLFormatHelper::icon($field->params->get('core.icon')); ?> <?php endif;?> </label> <?php if($field->params->get('core.label_break') > 1):?> <?php endif;?> <?php endif;?> </dt> <dd id="<?php echo 'dd-'.$field_id; ?>" class="<?php echo $field->fieldclass;?><?php echo ($field->params->get('core.label_break') > 1 ? ' line-brk' : NULL) ?>"> <?php echo $field->result; ?> </dd> <?php endforeach;?> </dl> <?php group_end($this);?> <?php endforeach;?> <?php endif;?> <?php if($started):?> <?php total_end($this);?> <?php endif;?> <?php if(in_array($params->get('tmpl_params.item_grouping_type', 0), array(1)) && count($this->item->fields_by_groups)):?> </div> <div class="clearfix"></div> <br /> <?php endif;?> <?php echo $this->loadTemplate('tags');?> <?php if($category || $author || $details || $params->get('tmpl_core.item_rating')): ?> <div class="well article-info"> <div class="row-fluid"> <?php if($params->get('tmpl_core.item_rating')):?> <div class="span2"> <?php echo $item->rating;?> </div> <?php endif;?> <div class="span<?php echo ($params->get('tmpl_core.item_rating') ? 8 : 10);?>"> <small> <dl class="dl-horizontal user-info"> <?php if($category):?> <?php echo implode(' ', $category);?> <?php endif;?> <?php if($author):?> <dt><?php echo JText::_('Posted');?></dt> <dd> <?php echo implode(', ', $author);?> </dd> <?php endif;?> <?php if($details):?> <dt>Info</dt> <dd class="hits"> <?php echo implode(', ', $details);?> </dd> <?php endif;?> </dl> </small> </div> <?php if($params->get('tmpl_core.item_author_avatar')):?> <div class="span2 avatar"> <img src="<?php echo CCommunityHelper::getAvatar($item->user_id, $params->get('tmpl_core.item_author_avatar_width', 40), $params->get('tmpl_core.item_author_avatar_height', 40));?>" /> </div> <?php endif;?> </div> </div> <?php endif;?> </article> <?php if($started):?> <script type="text/javascript"> <?php if(in_array($params->get('tmpl_params.item_grouping_type', 0), array(1))):?> jQuery('#tabs-list a:first').tab('show'); <?php elseif(in_array($params->get('tmpl_params.item_grouping_type', 0), array(2))):?> jQuery('#tab-main').collapse('show'); <?php endif;?> </script> <?php endif;?> <?php function group_start($data, $label, $name) { static $start = false; switch ($data->tmpl_params['record']->get('tmpl_params.item_grouping_type', 0)) { //tab case 1: if(!$start) { echo '<div class="tab-content" id="tabs-box">'; $start = TRUE; } echo '<div class="tab-pane" id="'.$name.'">'; break; //slider case 2: if(!$start) { echo '<div class="accordion" id="accordion2">'; $start = TRUE; } echo '<div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#'.$name.'"> '.$label.' </a> </div> <div id="'.$name.'" class="accordion-body collapse"> <div class="accordion-inner">'; break; // fieldset case 3: echo "<legend>{$label}</legend>"; break; } } function group_end($data) { switch ($data->tmpl_params['record']->get('tmpl_params.item_grouping_type', 0)) { case 1: echo '</div>'; break; case 2: echo '</div></div></div>'; break; } } function total_end($data) { switch ($data->tmpl_params['record']->get('tmpl_params.item_grouping_type', 0)) { //tab case 1: echo '</div>'; break; case 2: echo '</div>'; break; } } <?php echo <table id='display' width=548 border=0 summary="">?> <tr> <td rowspan=7><?php echo $item->fields_by_id[3]->result; ?></td> <td width=100><b>Author:</b></td> <td width=220><?php echo $item->fields_by_id[1]->result; ?></td> </tr> <tr> <td width=100><b>Publisher:</b></td> <td width=220><?php echo $item->fields_by_id[2]->result; ?></td> </tr> <tr> <td width=100><b>Genre:</b></td> <td width=220><?php echo $item->fields_by_id[9]->result; ?></td> </tr> <tr> <td width=100><b>CRR Heat Rating:</b></td> <td width=220><?php echo $item->fields_by_id[11]->result; ?></td> </tr> <tr> <td colspan=2><?php echo $this->ifields['Buy Amazon']; ?> </td> </tr> <tr> <td colspan=2><?php echo $this->ifields['Buy BandN']; ?> </td> </tr> <tr> <td colspan=2><?php echo $this->ifields['Buy Smashwords']; ?> </td> </tr> <tr> <td colspan=3><?php echo $item->fields_by_id[4]->result; ?></td> </tr> <tr> <td colspan=3><?php echo $this->ifields['CRR Review']; ?></td> </tr> </table> <?php echo $this->loadTemplate('tags');?> <?php if($category || $author || $details || $params->get('tmpl_core.item_rating')): ?> <div class="well article-info"> <div class="row-fluid"> <?php if($params->get('tmpl_core.item_rating')):?> <div class="span2"> <?php echo $item->rating;?> </div> <?php endif;?> <div class="span<?php echo ($params->get('tmpl_core.item_rating') ? 8 : 10);?>"> <small> <dl class="dl-horizontal user-info"> <?php if($category):?> <?php echo implode(' ', $category);?> <?php endif;?> <?php if($author):?> <dt><?php echo JText::_('Posted');?></dt> <dd> <?php echo implode(', ', $author);?> </dd> <?php endif;?> <?php if($details):?> <dt>Info</dt> <dd class="hits"> <?php echo implode(', ', $details);?> </dd> <?php endif;?> </dl> </small> </div> <?php if($params->get('tmpl_core.item_author_avatar')):?> <div class="span2 avatar"> <img src="<?php echo CCommunityHelper::getAvatar($item->user_id, $params->get('tmpl_core.item_author_avatar_width', 40), $params->get('tmpl_core.item_author_avatar_height', 40));?>" /> </div> <?php endif;?> </div> </div> <?php endif;?></article><?php if($started):?> <script type="text/javascript"> <?php if(in_array($params->get('tmpl_params.item_grouping_type', 0), array(1))):?> jQuery('#tabs-list a:first').tab('show'); <?php elseif(in_array($params->get('tmpl_params.item_grouping_type', 0), array(2))):?> jQuery('#tab-main').collapse('show'); <?php endif;?> </script><?php endif;?><?phpfunction group_start($data, $label, $name){ static $start = false; switch ($data->tmpl_params['record']->get('tmpl_params.item_grouping_type', 0)) { //tab case 1: if(!$start) { echo '<div class="tab-content" id="tabs-box">'; $start = TRUE; } echo '<div class="tab-pane" id="'.$name.'">'; break; //slider case 2: if(!$start) { echo '<div class="accordion" id="accordion2">'; $start = TRUE; } echo '<div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#'.$name.'"> '.$label.' </a> </div> <div id="'.$name.'" class="accordion-body collapse"> <div class="accordion-inner">'; break; // fieldset case 3: echo "<legend>{$label}</legend>"; break; }}function group_end($data){ switch ($data->tmpl_params['record']->get('tmpl_params.item_grouping_type', 0)) { case 1: echo '</div>'; break; case 2: echo '</div></div></div>'; break; }}function total_end($data){ switch ($data->tmpl_params['record']->get('tmpl_params.item_grouping_type', 0)) { //tab case 1: echo '</div>'; break; case 2: echo '</div>'; break; }} Thank you.
  14. Hi there, thank you for this. However, the table is not within php tags at all. I have the php code, then the table, then one line of php code again. I have attached the file as txt if that will assist. I appreciate your help.
  15. Hi there, oh pretty please can someone assist. I'm rapidly running out of time and cannot seem to get this to work for me. I have a content submission form and need the the output to display in a table format, so I'm adding this to the template php.... (Using Cobalt CMS on Joomla). My previous (Cobalt 7) templates worked fine with me adding the table as follows: <table id='display' width=548 border=0 summary=""> <tr> <td rowspan=7><?php echo $item->fields_by_id[3]->result; ?></td> <td width=100><b>Author:</b></td> <td width=220><?php echo $item->fields_by_id[1]->result; ?></td> </tr> <tr> <td width=100><b>Publisher:</b></td> <td width=220><?php echo $item->fields_by_id[2]->result; ?></td> </tr> <tr> <td width=100><b>Genre:</b></td> <td width=220><?php echo $item->fields_by_id[9]->result; ?></td> </tr> <tr> <td width=100><b>CRR Heat Rating:</b></td> <td width=220><?php echo $item->fields_by_id[11]->result; ?></td> </tr> <tr> <td colspan=2><?php echo $this->ifields['Buy Amazon']; ?> </td> </tr> <tr> <td colspan=2><?php echo $this->ifields['Buy BandN']; ?> </td> </tr> <tr> <td colspan=2><?php echo $this->ifields['Buy Smashwords']; ?> </td> </tr> <tr> <td colspan=3><?php echo $item->fields_by_id[4]->result; ?></td> </tr> <tr> <td colspan=3><?php echo $this->ifields['CRR Review']; ?></td> </tr> </table> I now get the following error: Parse error: syntax error, unexpected '<' in /home/classicr/public_html/components/com_cobalt/views/record/tmpl/default_record_library.php on line 695 I've traced this to the <table as above. I have looked on the web and found various examples where the table is included within the <?php ?> but cannot seem to find one that includes the php echo within the table. I've also tried adding the echo '<table> </table>' but that seemed to make it worse. I would really appreciate assistance with this. I know my ignorance is my greatest limitation and am trying to learn as I go along, but this silly little something has me totally flummoxed and I'm now b**** to the wall trying to get this finished to go live on Sunday. I shall grovel in abject gratitude.... Thank you, Jude
  16. Hi there, I'm busy setting up our bookstore which is essentially linked to Amazon, Smashwords and Barnes and Noble. The first two are a cakewalk, but B & N use a linkshare affiliate system which has my little brain boggled. I've done some research and it seems I can build an automatic link generator on my site. They are kind enough to provide sample code and from my limited understanding it seems that it might be possible to build this into my submission form, but the how to do it escapes me. I have created a module for this as it seemed better to display a module on the form page rather than try to incorporate it into the form itself. I can get the module to display, and can get the advertiser number (Barnes and Noble) to be automatically included (rather than have my submitters try to remember this). The problem is that when I click on the submit button, I get a 404 page not found error. If I include the second set of code in the module, the module itself displays an error to the effect that the link is missing. While I do see that the sample code indicates creating two pages (at least, that's how I interpret it) there is no indication as to where or how these should be incorporated into the site. I have emailed them, but their response is that they do not support php script issues. I would be most grateful for any and all assistance, as I need to have this in place three days ago Thank you! To explain: It's a simple form with following fields: Book Cover Book Blurb (summary) Genre (filter) Author Name Book Name Buy Amazon Buy Smashwords Buy Barnes and Noble Adding the code to link the Amazon and Smashwords products has not posed a problem, just Barnes and Noble. I have copied their tutorial and pasted below. I would really appreciate it if you could advise me on this. Thank you! (Another major learning curve) PHP Sample Code The Automated LinkGenerator is a Web Service that allows you to create LinkShare click links for any page on an advertiser's site. The code samples in this document demonstrate how to do this using PHP. First, we need to create a page that allows the user to enter an Advertiser URL and an Advertiser ID, and to click on submit to get the results. <html> <head> <title>LinkShare Automated LinkGenerator</title> </head> <body> <form method="post" action="AutoLinkGenProc.php"> Sample to use the Automated LinkGenerator Web Service <br /><br /> Enter Advertiser URL:<input type="text" name="AdvURL"><br /> Enter Advertiser ID:<input type="text" name="mid"><br /> <input type="submit" value="submit" name="submit"> </form> </body> </html> Here is what this will look like: We also need a page to send the query to the LinkShare server and process the response. This is the sample code demonstrating how to do this: <html> <body> <?php "http://getdeeplink.linksynergy.com/createcustomlink.shtml?token=<token-ID>&mid=<MID>&murl=<URL-from-merchant>"; $url = "http://getdeeplink.linksynergy.com/createcustomlink.shtml"; $token = "5849bcc2fd3a5f3fd9dc2f7d9c08d8924143983a2745f393bf45534b171d9807"; //Change this to your token $advURL=$_POST["AdvURL">; $MID=$_POST["mid">; $resturl = $url."?"."token=".$token."&mid=".$MID."&murl=".$advURL; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $resturl); $response=curl_exec($ch); if (curl_errno($ch)) { print "Error: " . curl_error($ch); } else { print $response; curl_close($ch); } ?> </body> </html> Here is the result this returns: http://click.linksynergy.com/fs-bin/click?id=KgGHO0LswUU&subid=&offerid=102327.1&type=10&tmpid=2405&RD_PARM1=http%3A%2F%2Fwww.tigerdirect.com%2Fapplications%2FSearchTools%2Fitem-details.asp%3FEdpNo%3D2450694%2526Sku%3DA179-15081 You should be able to use this response to build an image link: <a href=" http://click.linksynergy.com/fs-bin/click?id=KgGHO0LswUU&subid=&offerid=102327.1&type=10&tmpid=2405&RD_PARM1=http%3A%2F%2Fwww.tigerdirect.com%2Fapplications%2FSearchTools%2Fitem-details.asp%3FEdpNo%3D2450694%2526Sku%3DA179-15081"><IMG alt="TigerDirect" border="0" src="http://images.tigerdirect.com/skuimages/large/A179-1508CA-main-ca.jpg"></a>
  17. Hi there - first off, let me say "php novice" is euphemistic! I am, however, trying to learn - I have invested in "Php For Dummies" and am slowly wading through. At this point, though, I don't seem to have grasped the full logic of it and it's going to take time... My immediate problem is that I'm needing to very urgently create an article submission form and then display the data in a very specific (and simple?) way. I have a Joomla based website (http://www.classicromancerevival.com) and currently am testing the Mighty Resources components as a medium for site upgrade... I have, using their templates, created the form no problem, i.e. I have the right fields. What I need to do is amend the default template so that it has the standard layout of our book reviews (you can see an example of these - currently on the blog - at http://www.classicromancerevival.com/blog/?cat=http://www.classicromancerevival.com/blog/?cat=386 Looking at the template, I can see it's in table form, but simply rows one below the other, whereas I need the upper section to include the cover image plus the defining data of the book, with the actual review below. I also need the small butterfly image to automatically appear as a "fixture" on the form and the display article. I'm just totally confused and can't seem to grasp the "how" of it, i.e. what to do to change the way it displays! Probably really simple stuff, but I'm running out of time and need to learn this yesterday. Please can someone point me in the right direction, what to unravel first? Thank, and have a great day despite me.... Jude
  18. Hi there - on uploading and installing content manager I get the following error message: Fatal error: Call to undefined function jximport() in C:\Inetpub\wwwroot\EasyPHP 3.0\www\joomla\administrator\components\com_contentmanager\models\setup.php on line 188 and that the component wasn't properly installed. If I look under the components, Content Manager is there. No doubt i can find the relevant file (please note: ALL THIS IS TOTALLY NEW TO ME! But I wouldn't know how to change the relevant "undefined function"... Please can you tell me (in very simple language) what I should do and how to do it? Many thanks, Judah
×
×
  • 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.