Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Support / AdsManager Support / [RESOLVED] sentence next to the field

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

[RESOLVED] sentence next to the field

More
11 years 9 months ago - 11 years 8 months ago #9389 by gfoxtrot
[RESOLVED] sentence next to the field was created by gfoxtrot
Hello,
how can i ad some text next to the fields when i add a new ad??please see picture attached.

Thx very much,
George
Attachments:
Last edit: 11 years 8 months ago by gfoxtrot.
More
11 years 9 months ago #9401 by loic
Hello,

Yes it is possible but you need to do an override of the edit view.

Please be aware that the modification will be hard to implement.

Best regards.
The following user(s) said Thank You: gfoxtrot
More
11 years 9 months ago #9444 by horseguards
Replied by horseguards on topic sentence next to the field when you enter a new ad
I need exactly the same. Could you please publish a step-by-step example?
More
11 years 9 months ago #9450 by gfoxtrot
So there is another guy wanting this is it possible to give some more info?


Thx very much,
George
More
11 years 9 months ago #9473 by loic
Hello,

The easy way isn't really clean but it will work.

In the override of the edit file (the original file is located in components/com_adsmanager/views/edit/tmpl/default.php), you will find a few iterators where the position must be displayed.

In those iterators, you must modify this code:
<?php
		foreach($this->fields as $field)
		{
			if (@$field->options->edit_admin_only == 0) {
				$fieldform = $this->field->showFieldForm($field,$this->content,$this->default);
				if ($fieldform != "") {
                                    echo "<div id=\"row_".$field->name."\" class=\"span12\">";
                    echo "<div class=\"control-group\">";
                    if ($field->required == 1)
                    	$requiredtxt = JText::_('ADSMANAGER_REQUIRED');
                    else
                    	$requiredtxt = "";
                    if(!isset($field->options->display_edit_title) || $field->options->display_edit_title == 1){
                    if ((@$field->description)&&($field->description !="")) {
                    	JHTML::_('behavior.tooltip');
                    	echo "<label class=\"control-label\" for=\"{$field->name}\">".
                    		 JHTML::tooltip(TText::_($field->description),TText::_($field->title),null,$this->field->showFieldLabel($field,$this->content,$this->default).$requiredtxt).
                    		 "</label>";
                    } else {
						echo "<label class=\"control-label\" for=\"{$field->name}\">".$this->field->showFieldLabel($field,$this->content,$this->default).$requiredtxt."</label>";
					}
                    }
					echo $fieldform;
                    echo "</div>";
                                    echo "</div>";
				}
			} 
		}
		?>

Like this one:
<?php
		foreach($this->fields as $field)
		{
			if (@$field->options->edit_admin_only == 0) {
				$fieldform = $this->field->showFieldForm($field,$this->content,$this->default);
				if ($fieldform != "") {
                                    echo "<div id=\"row_".$field->name."\" class=\"span12\">";
                    echo "<div class=\"span9\">";
                    echo "<div class=\"control-group\">";
                    if ($field->required == 1)
                    	$requiredtxt = JText::_('ADSMANAGER_REQUIRED');
                    else
                    	$requiredtxt = "";
                    if(!isset($field->options->display_edit_title) || $field->options->display_edit_title == 1){
                    if ((@$field->description)&&($field->description !="")) {
                    	JHTML::_('behavior.tooltip');
                    	echo "<label class=\"control-label\" for=\"{$field->name}\">".
                    		 JHTML::tooltip(TText::_($field->description),TText::_($field->title),null,$this->field->showFieldLabel($field,$this->content,$this->default).$requiredtxt).
                    		 "</label>";
                    } else {
						echo "<label class=\"control-label\" for=\"{$field->name}\">".$this->field->showFieldLabel($field,$this->content,$this->default).$requiredtxt."</label>";
					}
                    }
					echo $fieldform;
                    echo "</div>";
                    echo "</div>";
                    echo "<div class=\"span3\">";
                    switch($field->name) {
                        case 'ad_price': echo 'text ad_price';
                            break;
                        case 'ad_text': echo 'text ad_text';
                            break;
                    }
                    echo "</div>";
                                    echo "</div>";
				}
			} 
		}
		?>

In the switch at the end of the last block, you can add as many field you want.

Please be aware that this code isn't clean at all but the cleaner code to do this is way to complex to publish it here.

And don't forget to do a backup of the edit file before doing some modifications.

Best regards.
The following user(s) said Thank You: gfoxtrot
More
11 years 9 months ago #9488 by gfoxtrot
Dear Loic,
Do i have to say that you are the best?

Thx a million,
George
Time to create page: 0.099 seconds
Powered by Kunena Forum