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 / Public Forum / Main Forum / [SOLVED] numerical field instead of text

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.

× OLD Forum post could be checked here : forum.joomprod.com

[SOLVED] numerical field instead of text

More
12 years 5 months ago - 12 years 5 months ago #5398 by Paco01
Hello modifying the list in the file: / var/www/Joom101a/templates/mx_joomla101/html/com_adsmanager/list, I want to present the "ad_kindof" field with the following script:
<div class="caracteristicas"> 
<? Php echo '<a href="'.$linkTarget.'">' $ content.> Ad_kindof '</ a>'.; > 
</ div>
the field is of type "select" and the result is numeric = "1", could help me to be the text type = "New"?
Attachments:
Last edit: 12 years 5 months ago by loic.
More
12 years 5 months ago #5406 by loic
Hello,

The ad_kindof field save a numeric value in database.

To display the good value, you can do this :
<?php
$modelField = $this->getModel( "field" );
$fieldKindof = $modelField->getField({Id_of_the_kindof_field});
//replace {Id_of_the_kindof_field} by the id of the kindof field (8 by default)
$valueKindof = $this->field->showFieldValue($content,$fieldKindof);
?>
 
<div class="caracteristicas"> 
<?php echo '<a href="'.$linkTarget.'">'.$valueKindof.'</ a>'; ?>
</ div>
More
12 years 5 months ago #5421 by Paco01
Hello, thanks for your help, using writing for many fields is the price of the previous ad right there, I use the following:
<?php
						$modelField = $this->getModel( "field" );
						$fieldKindof = $modelField->getField(8);
						//replace {Id_of_the_kindof_field} by the id of the kindof field (8 by default)
						$valueKindof = $this->field->showFieldValue($content,$fieldKindof);
					?>
 
					<?php
						$modelField = $this->getModel( "field" );
						$fieldstate = $modelField->getField(9);
						//replace {Id_of_the_kindof_field} by the id of the kindof field (9 by default)
						$valuestate = $this->field->showFieldValue($content,$fieldstate);
					?>
 
					<?php
						$modelField = $this->getModel( "field" );
						$fieldmarca = $modelField->getField(16);
						//replace {Id_of_the_kindof_field} by the id of the kindof field (16 by default)
						$valuemarca = $this->field->showFieldValue($content,$fieldmarca);
					?>
 
 
					<div class="caracteristicas"> 
					<?php echo '<a href="'.$linkTarget.'">'.$valueKindof.' </ a>'; ?>|
					<?php echo '<a href="'.$linkTarget.'">'.$valuestate.' </ a>'; ?>
					<?php echo "$c<br/>";?>
                    <?php echo '<a href="'.$linkTarget.'">'.$valuemarca.' </ a>'; ?>
					</div>

Annex a picture, thanks.
Attachments:
More
12 years 5 months ago #5453 by loic
Hello,

Did you still have the price problem ?

Best regards.
More
12 years 5 months ago #5462 by Paco01
Replied by Paco01 on topic [SOLVED] numerical field instead of text
Hello, excuse my bad English, but the prices are not welcome there the previous announcement, as I remove them?....thanks.
More
12 years 5 months ago #5477 by Paco01
Replied by Paco01 on topic [SOLVED] numerical field instead of text
Solved: Changing <br> by <?php echo "$c<br/>";?> ;)
Moderators: perry
Time to create page: 0.076 seconds
Powered by Kunena Forum