MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Dec 04, 2008, 01:36 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search via SMF
or Google:
modx forums
all of modxcms.com
web
MODxCMS.com
Forums
Help
Login
Register
News
:Donate to MODx:
Donations
MODx Community Forums
»
Add-ons, Extensions & Elements
»
Creating & Repurposing Content
»
Ditto
(Moderators:
Mark
,
PaulGregory
)
»
Using the [+phx tag insite ditto template is not working
Pages: [
1
]
Go Down
« Previous topic
Next topic »
Print
Author
Topic: Using the [+phx tag insite ditto template is not working (Read 2466 times)
0 Members and 1 Guest are viewing this topic.
Dimmy
Testers
Posts: 1,827
Я не говорю по-русски 私は日本語を話さない
Using the [+phx tag insite ditto template is not working
«
on:
May 15, 2007, 04:17 AM »
I use phx support for content manipulating like [+introtext:limit=`110`+], that works great but now I like to do this:
[+phx:mo=`Member`:then=`[+Member_price+]`:else=`[+price+]`+], but this return nothing. I think this is because the plugin that looks for the [+phx:tag+] will never see it. but is there another way that Ditto does use this tag and parse the phx part before the ditto part?
This would be a great addition to DItto.
I tried to make a tv with this line in it:
[+phx:mo=`Member`:then=`[*Member_price*]`:else=`[*price*]`+],
and called this new tv inside Ditto but this does not work eider.
Maybe I need to create a snippet instead?
Dimmy
«
Last Edit: May 15, 2007, 05:24 AM by Dimmy
»
Logged
"They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, because if you play it forwards, it installs Windows."
Nederlands beste portal voor pda en mobiel internet
Dimmy
Testers
Posts: 1,827
Я не говорю по-русски 私は日本語を話さない
Re: Using the [+phx tag insite ditto template is not working
«
Reply #1 on:
May 15, 2007, 06:41 AM »
This did not work eider:
@EVAL if ($modx->getLoginUserID()) return '[*Member_price*]'; else return '[*price*]';
Does DItto not support this kind of TV usage?
Dimmy
Logged
"They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, because if you play it forwards, it installs Windows."
Nederlands beste portal voor pda en mobiel internet
heliotrope
Coding Team
Posts: 2,447
Re: Using the [+phx tag insite ditto template is not working
«
Reply #2 on:
May 15, 2007, 06:45 AM »
Hi,
I guess you could use a custom placeholder to achieve what you trying to do.
there are some sample code in the ditto extenders folder.
:-)
Logged
Made with MODx :
traduction en ligne
|
agence de traduction
|
copadel, fruits et légumes
|
Provence
|
Dictionnaire en ligne
Professional Website:
dixsix, communication interactive
Dimmy
Testers
Posts: 1,827
Я не говорю по-русски 私は日本語を話さない
Re: Using the [+phx tag insite ditto template is not working
«
Reply #3 on:
May 15, 2007, 07:37 AM »
I looked at extenders but i do not grasp it. are there some detailed example including the steps what to do and the ditto call and template?
I realy like to learn this but I can't find any explenaition that I understand.
Greets Dimmy
Logged
"They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, because if you play it forwards, it installs Windows."
Nederlands beste portal voor pda en mobiel internet
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: Using the [+phx tag insite ditto template is not working
«
Reply #4 on:
May 15, 2007, 10:28 AM »
@Post 1:The items in your first post are returning nothing because Ditto can't (yet) see the nested placeholders. Assuming you are using Ditto 2, append &hiddenFields=`Member_price,price` to the call and continue using [+phx:mo=`Member`:then=`[+Member_price+]`:else=`[+price+]`+] in the template.
@Post 2: Where did you put that @EVAL line?
@Post 3: If you would like to learn, take a look at the example extender. Its fully commented and includes all of the features possible in an extender.
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
Dimmy
Testers
Posts: 1,827
Я не говорю по-русски 私は日本語を話さない
Re: Using the [+phx tag insite ditto template is not working
«
Reply #5 on:
May 15, 2007, 12:17 PM »
Quote from: Mark on May 15, 2007, 10:28 AM
@Post 1:The items in your first post are returning nothing because Ditto can't (yet) see the nested placeholders. Assuming you are using Ditto 2, append &hiddenFields=`Member_price,price` to the call and continue using [+phx:mo=`Member`:then=`[+Member_price+]`:else=`[+price+]`+] in the template.
Nice this works like a cham. great
Quote
@Post 2: Where did you put that @EVAL line?
in a 3th tv that is then called instead of the phx
Quote
@Post 3: If you would like to learn, take a look at the example extender. Its fully commented and includes all of the features possible in an extender.
I see what you mean I was looking in the wiki and the ditto.modxcms.com docs but those examples where not there. I looked at the example and I think I start to grasp it
Thanks for the help
Logged
"They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, because if you play it forwards, it installs Windows."
Nederlands beste portal voor pda en mobiel internet
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: Using the [+phx tag insite ditto template is not working
«
Reply #6 on:
May 16, 2007, 10:32 PM »
Dimmy, I just committed a fix to the source code that should let you use nested placeholders without &hiddenFields. If you get a chance, please try it out and let me know how it works.
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
Dimmy
Testers
Posts: 1,827
Я не говорю по-русски 私は日本語を話さない
Re: Using the [+phx tag insite ditto template is not working
«
Reply #7 on:
May 17, 2007, 04:59 AM »
I downloaded latest trunk but now I get this error:
Code:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error:
Compilation failed: nothing to repeat at offset 13
Error type/ Nr.:
Warning - 2
File:
/home/httpd/vhosts/1-vision.nl/subdomains/min/httpdocs/assets/snippets/ditto/classes/template.class.inc.php
Line:
87
Line 87 source:
preg_match_all('~\[\+([^\+\]]*+)\+\]~' , $tpl, $matches);
I removed the phx tags from the template but still the same result
I tryed downloading the developers release from the link in your footer but the tar argive looks corupted.
in ubuntu I get this error:
Code:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Error exit delayed from previous errors
and in winrar (windows) i get this:
Code:
! C:\Documents and Settings\Dimmy\Local Settings\Temp\ditto_rev_1432.tar.gz: The archive is corrupt
! C:\Documents and Settings\Dimmy\Local Settings\Temp\ditto_rev_1432.tar.gz: Unexpected end of archive
ok on mac it worked but got the same error.
«
Last Edit: May 17, 2007, 05:25 AM by Dimmy
»
Logged
"They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, because if you play it forwards, it installs Windows."
Nederlands beste portal voor pda en mobiel internet
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: Using the [+phx tag insite ditto template is not working
«
Reply #8 on:
May 17, 2007, 08:01 PM »
Could you provide your entire template for debugging purposes? Thanks. As for the archive trouble, I'll look into it.
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
Dimmy
Testers
Posts: 1,827
Я не говорю по-русски 私は日本語を話さない
Re: Using the [+phx tag insite ditto template is not working
«
Reply #9 on:
May 18, 2007, 02:45 AM »
Code:
<table width="100%">
<tr>
<td class="kolom1" valign="top" align="left">
<form method="post">
<input type="hidden" name="token" value="[*timestamp*]" />
<input type="hidden" name="itemid" value="[+id+]" />
<input type="hidden" name="name" value="[+title+]" />
<input type="hidden" name="price" value="[+phx:mo=`MiNkapper`:then=`[+MiNkapper_prijs+]`:else=`[+Particulier_prijs+]`+]" />
<input type="hidden" name="points" value="[+tvshopShippingPoints+]" />
<span id="numberofitems" style="color: #000">Aantal: </span>
<input type="text" id="hoeveelheid[+id+]" name="quantity" value="1" />
<input type="button" id="plusone" value="+" onmousedown="plus_one_edit('hoeveelheid[+id+]');" />
<input type="button" id="minusone" value="-" onmousedown="minus_one_edit('hoeveelheid[+id+]');" /><br />
<input type="submit" name="add" value="Toevoegen" />
</form>
</td>
<td class="kolom2" valign="top" align="left"><div id="thumbscontainer">
<a href="[~[+id+]~]">[[MaxiGallery? &galleryOuterTpl=`MG_outertpl` &dipslay=`embedded` &embedtype=`none` &gal_query_ids=`[+id+]` &limit=`1` ]]</a></div></td>
<td class="kolom3" valign="top" align="left"><span class="producttitel"><a href="[~[+id+]~]">[+longtitle+]</a></span><br/><span class="tussenruimte"><br/></span><span class="productinfo"><a href="[~[+id+]~]">[+productinfo+]</a></span>
<td valign="top"><span class="productprijs"><a href="[~[+id+]~]">€ [+phx:mo=`MiNkapper`:then=`[+MiNkapper_prijs+]`:else=`[+Particulier_prijs+]`+] </a></span></td>
</td>
</tr>
</table>
<br />
I did try removing phx and MG tags but same error
Logged
"They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, because if you play it forwards, it installs Windows."
Nederlands beste portal voor pda en mobiel internet
Pages: [
1
]
Go Up
Print
« Previous topic
Next topic »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Important News
=> Security Notices
-----------------------------
Commercial Support
-----------------------------
=> [CS] About Commercial Support
-----------------------------
Development & Coding
-----------------------------
=> Commercial Inquiries & Bounties
=> Core Code
===> MODx Next
===> xPDO
=> Module, Plugin & Snippet Creation and Modification
=> In Development
=> Templates
=> Internationalization
===> Bulgarian
===> Chinese
===> Czech
===> Dutch
===> French
===> German
===> Irish
===> Italian
===> Japanese
===> Polish
===> Portuguese
===> Russian
===> Slovak
===> Spanish
===> Swedish
===> Persian - فارسي
-----------------------------
Support
-----------------------------
=> Release Support
===> 0.9.6.2
===> 0.9.6.1
===> 0.9.6
===> 0.9.5 and earlier
=> General Support
===> MODx 101
===> E-Commerce, E-Marketing, Analytics & SEO
===> Hosting Experiences
===> IIS / Windows Hosting Issues
=> Documentation, Tips & Tricks
===> Documentation Suggestions & Corrections
-----------------------------
Add-ons, Extensions & Elements
-----------------------------
=> Module, Plugin & Snippet Usage
=> General Repository Items Support
=> Navigation & Tagging/Taxonomy
===> Wayfinder & DropMenu
=> Creating & Repurposing Content
===> Ditto
===> Jot
===> QuickEdit
=> Users, Authentication & Personalization
===> WebloginPE
===> WebLogin, WebSignup and WebChangePwd
=> Rich Text Editors & File Browser
===> TinyMCE
===> FCKeditor
===> MCPuck File Browser
=> Forms, Form Processing & Anti-Spam
===> eForm
=> Search
===> AjaxSearch
=> E-business
=> Polls, Calendars, Address Book and Community
=> Third-party integrations
=> Images, Videos & Podcasts
===> MaxiGallery
=> Manager, Parser & the Core
===> Backup & Versioning
===> Doc Finder
===> ManagerManager
===> PHx
=> Templates
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Web Design and Development
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
Czech Community
-----------------------------
=> Oznámení
===> Důležitá oznámení/novinky
===> Bezpečnost
=> Podpora
===> FAQ (často kladené otázky)
===> Instalace
===> Moduly, pluginy, "snippets & code" (šablony zdrojových kódů)
===> Design & Šablony
=> Dokumentace, tutoriály (návody) a překlady
===> Dokumentace
===> Tutoriály (návody)
===> Překlady (lokalizace)
=> Komunita
===> Oznámení
===> Představte se, prosím
===> Ukázky práce
===> Různé aneb cokoli co se jinam nehodí
-----------------------------
Bulgarian Community
-----------------------------
=> Поддръжка
===> Често задавани въпроси
===> Инсталация
===> Модули, Плъгини, Снипети и код
===> Дизайн и Шаблони
=> Документация, Ръководства и Превод
===> Документация
===> Ръководства
===> Превод
=> Общество
===> Съобщения
===> Представете се
===> Представете сайта си
===> Дискусии извън MODx
-----------------------------
Dutch Community
-----------------------------
=> Ondersteuning
===> Veel gestelde vragen
===> Modules, Plugins, Snippets & Code
===> Design & Templates
=> Documentatie, Tutorials en Vertalingen
===> Documentatie
===> Tutorials
===> Vertalingen
=> Community
===> Aankondigingen
===> Stel jezelf voor
===> Site Showcase
===> De stamkroeg
-----------------------------
Finnish Community
-----------------------------
=> Tuki
===> UKK
===> Asennus
===> Moduulit, liitännäiset, koodinpätkät
===> Ulkoasu/Sivustopohjat
=> Dokumentaatio, oppaat ja käännökset
===> Dokumentaatio
===> Käännökset
===> Oppaat
=> Yhteisö
===> Tiedotteet
===> Esittele itsesi
===> MODx sivustosi
===> Kahvihuone
-----------------------------
Filipino Community
-----------------------------
=> Suporta
===> Kadalasang tanong
===> Instalasyon
===> Moduler, Maidadagdag, Karagdagang mga Code
===> Desenyo at Templates
=> Dokumentasyon, Mga Turo, Mga Salin
===> Dokumentasyon
===> Mga Turo
===> Mga Salin
=> Kumunidad
===> Anunsyo
===> Ipakilala ang sarili
===> Ang Galing ng pinoy
===> Tsismisan atbp
-----------------------------
French Community
-----------------------------
=> Support
===> FAQ
===> Installation
===> Module, plugin, snippets
===> Design/Templates
=> Documentation, Tutoriels et Traductions
===> Documentation
===> Traduction
===> Tutoriels
=> Communauté
===> Annonces
===> Présentez vous
===> Vos sites
===> Le Bistrot Français
-----------------------------
German Community
-----------------------------
=> Support (de)
===> FAQ (de)
===> Installation (de)
===> Module, Plugins, Snippets & Code (de)
===> Design & Templates (de)
=> Dokumentation, Tutorials und Übersetzung
===> Dokumentation
===> Tutorials (de)
===> Übersetzung
=> Community (de)
===> Ankündigungen
===> Stellt Euch vor
===> Beispielseiten
===> Off Topic / Verschiedenes
-----------------------------
Irish Community
-----------------------------
=> Tacaíocht
===> CC Ceisteanna Coitianta
===> Breiseáin (cláir bhreise), Snippets & Comhaid
===> Suiteáil
===> Dearadh & Teimpléid
=> Doiciméid, Teagascóireacht agus Aistriúchán
===> Doiciméadú
===> Teagascóireacht
===> Aistriúchán
=> Pobal
===> Fógraí
===> Cuir Tú Féin in Aithne
===> Gailearaí an Láithreáin
===> Caifé / An Tábhairne / Ábhar Cainte Eile / Ilghnéitheach
-----------------------------
Italian Community
-----------------------------
=> Supporto
===> FAQ
===> Installazione
===> Moduli, Plugin, Snippet e altro codice
===> Web Design e Template
=> Documentazione, Tutorial e Traduzione
===> Documentazione
===> Tutorial
===> Traduzione
=> Comunità
===> Annunci
===> Presentazioni
===> Siti in vetrina
===> Chiacchiere in libertà
-----------------------------
Japanese Community
-----------------------------
=> サポート
===> 良くある質問
===> インストール
===> モジュール・プラグイン・スニペット・本体
===> デザインやテンプレート
=> マニュアル・テュートリアル・翻訳
===> マニュアル
===> 事例集、テュートリアル
===> 日本語化
=> コミュニティ
===> お知らせ
===> MODxサイト展示場
===> 自己紹介
===> 雑談
===> 国産リソース
-----------------------------
Persian Community
-----------------------------
=> پشتيباني
===> راهنما
===> نصب
===> ماژول , پلاگین ها , کد ها و جزییات
===> طراحی و قالب ها
=> مستند سازی , آموزش ها و ترجمه ها
===> مستند سازی
===> آموزش ها
===> ترجمه ها
=> انجمن ها
===> اخبار
===> معرفی کردن خود
===> نمایش دادن سایت ها
===> بحث های عمومی و سایر موضوعات
-----------------------------
Polish Community
-----------------------------
=> Wsparcie
===> FAQ
===> Instalacja
===> Moduły, pluginy, snipety i kod
===> Wygląd i szablony
=> Dokumentacja, tutoriale i tłumaczenie
===> Dokumentacja
===> Tutoriale
===> Tłumaczenie
=> Społeczność
===> Ogłoszenia
===> Przedstaw się
===> Twój serwis WWW
===> Hyde Park
-----------------------------
Portuguese Community
-----------------------------
=> Suporte
===> FAQ - Dúvidas Frequentes
===> Instalação
===> Módulos, Plugins, Snippets e Código
===> Design e Templates
=> Documentação, Guias e Traduções
===> Documentação
===> Guias
===> Traduções
=> Comunidade
===> Anúncios
===> Apresente-se!
===> Bar da esquina (fora de tópico)
===> Portfólio de Sites
-----------------------------
Russian Community
-----------------------------
=> Поддержка
===> ЧАВО (FAQ)
===> Установка
===> Модули, плагины, сниппеты и код
===> Дизайны и шаблоны
=> Документация, Уроки, Перевод
===> Документация
===> Уроки
===> Перевод
=> Сообщество
===> Объявления
===> Представьтесь публике
===> Галерея сайтов
===> Диван
-----------------------------
Scandinavian Community
-----------------------------
=> Support
===> Frågor och svar
===> Installation
===> Moduler, plugins, snippets och kod
===> Design & sidmallar
=> Dokumentation, guider och översättningar
===> Dokumentation
===> Guider
===> Översättningar
=> Webbgemenskap
===> Meddelanden
===> Presentera dig själv
===> Visa upp dina webbsidor
===> Ordet fritt
-----------------------------
Spanish Community
-----------------------------
=> Soporte
===> FAQ
===> Instalación
===> Modulos, Plugins, Snippets & Código
===> Diseño y plantillas
=> Documentación, Tutoriales y Traducciones
===> Documentatción
===> Tutoriales
===> Traducciones
=> Comunidad
===> Anuncios
===> Presentaciones personales
===> Muestra de sitios
===> El Café
-----------------------------
TÜRKÇE (Turkish)
-----------------------------
=> Destek
===> SSS
===> Kurulum
===> Modüller, Pluginler, Snippetlar & Kodlar
===> Dizayn & Temalar
=> Belgeleme, Eğitmenler ve Çeviri
===> Belgeleme
===> Eğitmenler
===> Çeviri
=> Topluluk
===> Duyurular
===> Kendinizi Tanıtın
===> Site Vitrini
===> Konu Dışı