-
AuthorPosts
-
degagee Friend
degagee
- Join date:
- June 2011
- Posts:
- 10
- Downloads:
- 10
- Uploads:
- 2
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
July 11, 2012 at 4:24 pm #178995First to say: I really appreciate the JA-Wall idea and implemantation! Very good, innovative and extraordinary work…
As I start playing around, one thing for me is missing: I would like to add “Extended Classes” to articles in front end editing. As it seams, this is only possible in back end editing. Can anyone implement this, because I think it could be a great feaure, expecially if you give the site to customers…Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
July 13, 2012 at 7:16 am #460798Hi degagee,
You could try as following steps
1) Open the file of componentscom_contentmodelsformsarticle.xml you add the below tag right above the tag of </form> at bottom
<fields name=”metadata”>
<field name=”robots”
type=”list”
label=”Robots”
description=”JFIELD_METADATA_ROBOTS_DESC”
>
<option value=””>JGLOBAL_USE_GLOBAL</option>
<option value=”index, follow”>JGLOBAL_INDEX_FOLLOW</option>
<option value=”noindex, follow”>JGLOBAL_NOINDEX_FOLLOW</option>
<option value=”index, nofollow”>JGLOBAL_INDEX_NOFOLLOW</option>
<option value=”noindex, nofollow”>JGLOBAL_NOINDEX_NOFOLLOW</option>
</field><field name=”author” type=”text”
label=”JAUTHOR” description=”JFIELD_METADATA_AUTHOR_DESC”
size=”20″ /><field name=”rights” type=”textarea” label=”JFIELD_META_RIGHTS_LABEL”
description=”JFIELD_META_RIGHTS_DESC” required=”false” filter=”string”
cols=”30″ rows=”2″ />
<field name=”xreference” type=”text”
label=”External Reference”
description=”COM_CONTENT_FIELD_XREFERENCE_DESC”
class=”inputbox” size=”20″ />
</fields>2) Then you open the file of componentscom_contentmodelsform.php adding this block of code
[PHP] // Convert the metadata field to an array.
$registry = new JRegistry;
$registry->loadString($value->metadata);
$value->metadata = $registry->toArray(); [/PHP]Right below this block
[PHP]
// Convert attrib field to Registry.
$value->params = new JRegistry;
$value->params->loadString($value->attribs);
[/PHP]3) Finally You open the file of componentscom_contentviewsformtmpledit.php adding this block of code
[PHP]
<?php foreach($this->form->getGroup(‘metadata’) as $field): ?>
<li <?php if($field->name !== “jform[metadata][xclass]”) { ?> style=”visibility:hidden;height:0px” <?php }?> >
<?php if (!$field->hidden): ?>
<?php echo $field->label; ?>
<?php endif; ?>
<?php echo $field->input; ?>
</li><?php endforeach; ?>
[/PHP]
Right below this code
[PHP]
<div class=”formelm-area”>
<?php echo $this->form->getLabel(‘metakey’); ?>
<?php echo $this->form->getInput(‘metakey’); ?>
</div>
[/PHP]Try it and let me know if it still does not help !
degagee Frienddegagee
- Join date:
- June 2011
- Posts:
- 10
- Downloads:
- 10
- Uploads:
- 2
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
July 16, 2012 at 7:34 am #460995Hi Sherlock Holmes,
thanks a lot for your suggestion.
I made the change in the administrator/…/article.xml and the change in components/…/form.php, but there isn’t a “Exended Class” field.As I was playing around before I did my post here, I added a “extended” field in the file components/com_content/views/form/tmpl/edit.php this way:
[PHP] <fieldset>
<legend><?php echo JText::_(‘COM_CONTENT_METADATA’); ?></legend>
<div class=”formelm-area”>
<?php echo $this->form->getLabel(‘metadata_xclass’); ?>
<?php echo $this->form->getInput(‘metadata_xclass’); ?>
</div>
<div class=”formelm-area”>
<?php echo $this->form->getLabel(‘metadesc’); ?>
<?php echo $this->form->getInput(‘metadesc’); ?>
</div>
<div class=”formelm-area”>
<?php echo $this->form->getLabel(‘metakey’); ?>
<?php echo $this->form->getInput(‘metakey’); ?>
</div><input type=”hidden” name=”task” value=”” />
<input type=”hidden” name=”return” value=”<?php echo $this->return_page;?>” />
<?php if($this->params->get(‘enable_category’, 0) == 1) :?>
<input type=”hidden” name=”jform” value=”<?php echo $this->params->get(‘catid’, 1);?>”/>
<?php endif;?>
<?php echo JHtml::_( ‘form.token’ ); ?>
</fieldset>[/PHP]
Your suggestion does not work with my changes nor on a plain installation.
Any more suggestions?Again: Thanks a lot, so far!
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
degagee Frienddegagee
- Join date:
- June 2011
- Posts:
- 10
- Downloads:
- 10
- Uploads:
- 2
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
July 17, 2012 at 7:04 pm #461192Dear Sherlock Holmes,
your changes were perfect, now it does the job!
Perfect timing as well, tomorrow I’m going to present the system to a client and I’m happy to present it with this front end feature!
SOLVED!Andrew Winkler FriendAndrew Winkler
- Join date:
- September 2014
- Posts:
- 725
- Downloads:
- 206
- Uploads:
- 31
- Thanks:
- 291
- Thanked:
- 34 times in 2 posts
January 3, 2013 at 12:01 pm #478272I tried following your instructions above with the result that my page went blank every time I tried to edit an article from the frontend. If it’s not too much trouble, could you please create a zip file with the patched version of the files and link to them from this thread, plus instructions where to put them.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 4, 2013 at 8:29 am #478416You can download and extract three following files appropriate with path below:
+ components/com_content/models/forms/article.xml
+ components/com_content/models/form.php
+ components/com_content/views/form/tmpl/edit.phpRemember to backup old files before overridding it(this customization appears with joomla2.5)
You can see it on front-end site, see the screenshot
1 user says Thank You to Ninja Lead for this useful post
January 21, 2013 at 11:13 am #480620Hi guys,
great post! very clear.Although it involves modifying core joomla files. Is it possible to do the same without any core modification?
Thx for your help,
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 22, 2013 at 8:21 am #480732<em>@boetco 356278 wrote:</em><blockquote>Hi guys,
great post! very clear.Although it involves modifying core joomla files. Is it possible to do the same without any core modification?
Thx for your help,</blockquote>
Nope, because everything customized above is hacked to change on JOOMLA CORE , but you need to backup on this and compare it when you are doing to upgrade new version JOOMLA Core.
January 22, 2013 at 10:10 am #480753Question why some pictures are bigger?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 23, 2013 at 2:42 am #480822<em>@archarank 356469 wrote:</em><blockquote>Question why some pictures are bigger?</blockquote>
I’m not sure what you are implying. Just for better clarification, please include screenshot and your site URL here for further investigation.stefane06 Friendstefane06
- Join date:
- August 2013
- Posts:
- 11
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 1 times in 1 posts
August 26, 2013 at 1:34 pm #503465Hello,
since JOOMLA 3.1 the Extended Class.zip you give as download breaks the editing template.
Do you have a new version of this zip?N.B/ the JA WALL is really interesting! Bravo for the work 🙂
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 27, 2013 at 4:44 am #503555You can follow the solution in this thread
-
AuthorPosts
This topic contains 13 replies, has 7 voices, and was last updated by Ninja Lead 11 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum