I am attempting to make some changes to com_content element of Joomla 1.7 You will find very few paperwork on specific subject for Joomla 1.7

You may could assist me on that one.

I wish to possess a separate area for added image in com_content, particularly to Featured view.

Within the administrator's part I handled to include the area - just in html, then into xml file and lastly to DB.

Now I am looking to get that record displayed during my custom html view for Featured articles.

I simply used simple code echo $this->item->addimage but regrettably it isn't displayed.

Any ideas how to accomplish this?


And something more factor, so far as I've observed, component development structure, DB registration and so forth, continues to be transformed in Joomla 1.7. Any useful link(s) where things are described well?

Well. If you're certain your implementation of the items you have carried out works. ie. Embedded image or just URL link from area you've added are saved within the database take a look into frontpage file /components/com_content/sights/featured/tmpl/default_item.php

There you need to place your $this->item->addimage variable like:

<img src="<?php echo $this->item->addimage ?>" />

Should you store URL link, or

<img src="image/pngbase64,<?php echo $this->item->addimage ?>" />

in case your keep image as RAW base64 encoded data

Edit: This will solve your condition should you add your posts from frontend (if after sales, just tell me)

  1. First of all produce a new column in jos_content table like:

'addimage' varchar(255) DEFAULT NULL

Then customize the following files:

  1. ../com_content/sights/featured/tmpl/default_image.php [LINE: 29]


    30:#<?php endif ?>

    32: <?php if(!empty($this->item->addimage)): ?>

    33: <img src="<?php echo $this->item->addimage ?>" alt="ADDIMAGE" />

    34: <?php endif ?>

    36: #<?php if ($params->get('show_print_icon') $params->get('show_email_icon') $canEdit) : ?>

  2. ../com_content/models/articles.php [LINE: 160]

    160: # $this->getState(

    161: # 'list.select',

    162: 'a.id, a.title, a.alias, a.title_alias, a.introtext, a.addimage, ' .

    163: #'a.checked_out, a.checked_out_time, ' .

  3. ../com_content/models/forms/article.xml [ADD SOMEWHERE]

    <field id="addimage" title="addimage" type="text" label="Add Image" class="inputbox" />

  4. ../com_content/sights/form/tmpl/edit.php [LINE: 82]

    82: #<?php echo $this->form->getInput('created_by_alias') ?>

    83: #</div>

    85: <div class="formelm">

    86: <?php echo $this->form->getLabel('addimage') ?>

    87: <?php echo $this->form->getInput('addimage') ?>

    88: </div>

    90: #<?php if ($this->item->params->get('access-change')): ?>

com_submissions are not really the way in which for creating variable content in joomla any longer. Will still be exactly the same unflexible code since mambo days. You should attempt solutions like K2, flexicontent or the best ZOO. They are simple to learn and you will do plenty of awesome stuff together. Extra Fields? No Proble., A number of them already exists for Joomla 1.7/2.5. Hacking the core is definitely bad. Due to the fact you loose your update path.