For one of my projects I want to use CustomField, which will contain image.
Yes, I know: I can write img src="uploads/*stars.gif", but - it's long and not bulletproof writing.
I'll prefer to write smth. like{$one}...{$ten} as CF-value
Can I do it andif yes - how?
Easy way to use CustomField
-
LazyBadger
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Easy way to use CustomField
Quis custodiet ipsos custodes?
Re: Easy way to use CustomField
I think the custom fields option of the extended entry properties plugin is just what you're looking for.LazyBadger wrote:For one of my projects I want to use CustomField, which will contain image.
YL
-
LazyBadger
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Re: Easy way to use CustomField
Well, custom fields from ExtendedProperies is tool of choice (and was before I started topic - I just don't know another solution).
I just asked - how to write in field less text, if I have (5-10) hardcoded patterns and too lazy repeat all html every time
I just asked - how to write in field less text, if I have (5-10) hardcoded patterns and too lazy repeat all html every time
Quis custodiet ipsos custodes?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Easy way to use CustomField
Hi!
You could also code a simple PHP script that creates your patterns so that you can copy&paste them:
HTH
Garvin
You only need to do that once in the plugin setup, not every time?!LazyBadger wrote:Well, custom fields from ExtendedProperies is tool of choice (and was before I started topic - I just don't know another solution).
I just asked - how to write in field less text, if I have (5-10) hardcoded patterns and too lazy repeat all html every time
You could also code a simple PHP script that creates your patterns so that you can copy&paste them:
Code: Select all
<?php
$patterns = explode('content,description,header');
$iterations = 10;
$i = 0;
while($i <= $iterations; $i++) {
$i++;
foreach($patterns AS $pattern) {
echo $pattern . $i . ",";
}
}
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
LazyBadger
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Re: Easy way to use CustomField
In plugin setup I can change fields count, field name and nothing (?) more. My task isgarvinhicking wrote:
You only need to do that once in the plugin setup, not every time?!
in single field in every entry write like this (changeable parts are italicized)
Rating<br />
<img src="uploads/one.gif"> — <span class="one">Terrible</span>
Using event_smarty for CF can be excellent solution
Quis custodiet ipsos custodes?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Easy way to use CustomField
Hi!
Sure, you can simply enter "one" in your custom field, and then change your entries.tpl to use that placeholder to emit the complete HTML.
Regards,
Garvin
Sure, you can simply enter "one" in your custom field, and then change your entries.tpl to use that placeholder to emit the complete HTML.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/