Page 11 of 32
Posted: Tue 25. Apr 2006, 23:35
by breitsch
Ben wrote:Can you give us some details about what you have planned for the e-commerce section? I guess my big questions relate to order management and payment gateways.
I took the existing mod:
http://www.phpwcms.de/forum/viewtopic.p ... c&start=30
but i want to modify it a bit, like e.g. some variables in database editable in backend (tax and shipping).
Payment Gateways: PAYPAL so far
Any experts for payment systems out there?
moo.fx-Proble,
Posted: Wed 26. Apr 2006, 11:54
by fkeiner
Hi Breitsch,
i just tried to test moo.fx but it doesn't work for me at the moment.
I only see
{EF1} {EF2}
{EF3}
{EF4}{EF5}
{EF6}
{EF7}
{EF8}
I didn't change the moo.fx template yet. Should I?
Perhaps you can help me!
Thanks in advance,
Frank[/url]
Posted: Wed 26. Apr 2006, 12:08
by pico
Hi
AFAIK for Ajax you need a Doctype XML - and phpWCMS has HTML as Doctype
Re: moo.fx-Proble,
Posted: Wed 26. Apr 2006, 12:27
by Paal
fkeiner wrote:Hi Breitsch,
i just tried to test moo.fx but it doesn't work for me at the moment.
I only see
{EF1} {EF2}
{EF3}
{EF4}{EF5}
{EF6}
{EF7}
{EF8}
I didn't change the moo.fx template yet. Should I?
Perhaps you can help me!
Thanks in advance,
Frank[/url]
Hello,
Read you this?
To use ExData custom templates with moo.fx you have to do a few changes to you installation:
Step 1:
Download the moo.fx package from:
http://moofx.mad4milk.net
Upload the files:
-moo.fx.js
-moo.fx.pack.js
-prototype.lite.js
to the directory:
PHPWCMS_ROOT/include/inc_js/moo
Step 2:
Open: PHPWCMS_ROOT/index.php
find:
Code: Select all
$content['page_start'] = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
change to:
Code: Select all
$content['page_start'] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
Step 3:
In your layout (in backend) add to the html head section:
Code: Select all
<script type="text/javascript" src="include/inc_js/moo/prototype.lite.js"></script>
<script type="text/javascript" src="include/inc_js/moo/moo.fx.js"></script>
<script type="text/javascript" src="include/inc_js/moo/moo.fx.pack.js"></script>
<script type="text/javascript">
<!--
window.onload = function() {
//we define two arrays, containing our toggles and divs.
var myDivs = document.getElementsByClassName('stretcher');
var myLinks = document.getElementsByClassName('stretchtoggle');
//then we create the effect.
var myAccordion = new fx.Accordion(myLinks, myDivs, {opacity: true, duration: 400});
// Select your default opened section
//myAccordion.showThisHideOpen(myDivs[0]);
}
//-->
</script>
Step 4:
Change and/or rename moofx.template.php in directory:
PHPWCMS_ROOT/include/inc_module/mod_exdata/inc_front/tmpl_moofx
All files within this directory will be shown in Replacementtag-Maker
Change the html to your needs! Basic requirements are:
Note in second line: complete title, {EF1} means the content of the first field in ExData will be shown as link in frontend, change the number to your needs.
Code: Select all
<div id="exd_item" width="100%">
<span class="stretchtoggle" title="..." name="top"><a href="#top">{EF1}</a></span>
<div class="stretcher">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="exd_field">{TF1}</td>
<td class="exd_entry">{EF1}</td>
</tr>
<tr>
<td class="exd_field">{TF2}</td>
<td class="exd_entry">{EF2}</td>
</tr>
[....]
</table>
</div></div>
Step 5:
You can now use the Replacementtag-Maker here in backend:
Code: Select all
{EXDATA:[category-ID]:0:[moofx.template.php]}
check the fontend in HEAD section:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
phpwcms | free open source content management system
created by Oliver Georgi (oliver at phpwcms dot de) and licensed under GNU/GPL.
phpwcms is copyright 2003-2005 of Oliver Georgi. Extensions are copyright of
their respective owners. Visit project page http://www.phpwcms.org for details.
//-->
<html>
<head>
.
.
<script src="include/inc_js/moo/prototype.lite.js" type="text/javascript"></script>
<script src="include/inc_js/moo/moo.fx.js" type="text/javascript"></script>
<script src="include/inc_js/moo/moo.fx.pack.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
window.onload = function() {
//we define two arrays, containing our toggles and divs.
var myDivs = document.getElementsByClassName('stretcher');
var myLinks = document.getElementsByClassName('stretchtoggle');
//then we create the effect.
var myAccordion = new fx.Accordion(myLinks, myDivs, {opacity: true, duration: 400});
// Select your default opened section
//myAccordion.showThisHideOpen(myDivs[0]);
}
//-->
</script>
.
.
</head>
I made this after the Moo.FX setup:
go to -> Bakcend/Modules/ExData Module/Categories
1. add category
the result
Code: Select all
Current Categories
test cat1 ID=1 Edit | Delete | Make Replacement-Tag
2. Select the "Make Replacement-Tag"
Code: Select all
Category Name : test cat1
Create Replacement Tag
Auto Templates | Flash Charts | MooFX List
3. Select the "MooFX List"
4. Click the "Create Replacement Tag" button.
go to -> Bakcend/Modules/Articles
5. Create new article
6. add "Plain Text" content part
7. insert the generated RT into the cntpart
8. save and check the frontend!
Paul
[SOLVED]
Posted: Wed 26. Apr 2006, 13:03
by fkeiner
Everything is working fine now. By mistake, i had put the code for the head-section in a wrong line. Not everything is ok!
Thank you!
Posted: Mon 1. May 2006, 19:55
by ddubach
hi!
Will the sort and paging function for frontend ever be available in own created templates??
Would be nice!!
thx
Posted: Tue 2. May 2006, 00:16
by breitsch
ddubach wrote:Will the sort and paging function for frontend ever be available in own created templates??
paging-function is no problem.
sort-function can be tricky because it depends on the structure of your template. it's possible when you list in sort-function each field of current category that contains data regardless of the appearance of this field in the template.
could you send me your template or a link to your page, so I have a idea of what it looks like?
ExData and MooFX
Posted: Wed 3. May 2006, 21:28
by fardilha
Hello.
Let me start by saying that i love ExData.
It's a really flexible mod.
I liked it so much that I decide to start using it on all my websites.
Right now I'm trying to understand how MooFX works, so I decided to use it on one of the websites that i'm doing right now.
(
http://editora.up.pt/site/index.php?id=25,0,0,1,0,0 )
One thing that I realized is that MooFX doesn't use the template that I create for the "auto template" so the options to not "show the category name" and "paging" on a certain number of rows doesn't work.
The same can be said from the fields that are empy.
On the auto layout, they just don't appear.
Is there any way to make this options work with MooFX lists ?
Thank you!
Pedro Fardilha
Posted: Sun 7. May 2006, 22:54
by breitsch
ddubach wrote:Will the sort and paging function for frontend ever be available in own created templates??
and
fardilha wrote:One thing that I realized is that MooFX doesn't use the template that I create for the "auto template" so the options to not "show the category name" and "paging" on a certain number of rows doesn't work.
The same can be said from the fields that are empy.
On the auto layout, they just don't appear.
Is there any way to make this options work with MooFX lists ?
Download 'Update 233' from
http://web.casa-loca.com/index.php?downloadexdata
This will update your Exdata Module (Version 2.0 +) with the following features:
in moo.fx-templates and personal templates:
- Add Sort-Drop-Down and/or Paging with Replacementtag as shown below.
- Now it cuts empty entries.
To use the functions in your templates:
Open the main-template an add the following Replacementtags as shown in the example:
for the paging-funcion: {EXD_PAGES:[number of entries on one page]:[text before the pagelisting]}
for the sort-funcion: {EXD_SORT:[text before the sort-drop-down]}
Example:
Code: Select all
<div id="exd_head">
{EXD_HEAD}
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" align="left" id="exd_paging">{EXD_PAGES:3:page}</td>
<td width="50%" align="right" id="exd_sort">{EXD_SORT:sort by}</td>
</tr>
</table>
<div id="exd_items">
{EXD_ITEMS}
</div>
Save this main-template as e.g. page.sort.template.php in directory: mod_exdata/inc_front/templates
then use this main-template as second parameter in EXDATA-RT as:
{EXDATA:[id of category]:page.sort.template.php:[listing.template]}
The css-definitions (#exd_paging + #exd_sort in example above) can be added in mod_exdata/inc_front/templates/exdata.css
Running example (with moo.fx but it's the same for personal templates):
http://web.casa-loca.com/index.php?example_moofx
Posted: Sun 7. May 2006, 23:25
by fardilha
Thank you! Thank you! Thank you!
Pedro Fardilha
Posted: Mon 8. May 2006, 00:05
by breitsch
fardilha wrote:Thank you! Thank you! Thank you!
Pedro Fardilha
Oh welcome, didn't we agree a 2-weeks-free-of-charge-vacation in Portugal?
Just give me your preferred date and i'll be there! We said for 2 Pax didn't we?
Posted: Mon 8. May 2006, 00:17
by fardilha
Well, if you came here, you can allways go to this short movies festival:
http://www.corta.pt/
I'll get you some free tickets
You can notice that the site is made using phpwcms ( by yours truly
) .
(To be fair I'm also one of the creators and producers of the festival.
True to the "open source" spirit, the festival is free to anyone to compete and to go there. No tickets needed )
Posted: Mon 8. May 2006, 17:25
by fardilha
Hi.
Sorry to bother again, but if you wanna that free stay in Portugal I need to ask your help once more.
I updated my web site with your new code.
(Actually I was already using that nice shopping cart mod that can be found on another topic of this forum but with this options I decided to revert to exData
I don't need the payment processing options... yet
I'll gladly wait until you finish integrating it!
)
Well... back to business:
The sorting and paging are working just fine (did I already thank you??? )
But the empty entries are still there.
I changed a little my moo.fx.tempalte.php
Now it look like this:
Code: Select all
<!-- default event template -->
<div id="exd_item" width="100%">
<span class="stretchtoggle" title="news" name="top"><a href="#self">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="exd_field"></td>
<td class="exd_entry">{EF1}</td>
</tr>
<tr>
<td class="exd_field">{TF2}</td>
<td class="exd_entry">{EF2}</td>
</tr>
<tr>
<td class="exd_field">{TF9}</td>
<td class="exd_entry">{EF9}</td>
</tr>
</table>
</a></span>
<div class="stretcher">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<!-- <tr>
<td class="exd_field">{TF1}</td>
<td class="exd_entry">{EF1}</td>
</tr>
<tr>
<td class="exd_field">{TF2}</td>
<td class="exd_entry">{EF2}</td>
</tr> //-->
<tr>
<td class="exd_field">{TF3}</td>
<td class="exd_entry">{EF3}</td>
</tr>
<tr>
<td class="exd_field">{TF4}</td>
<td class="exd_entry">{EF4}</td>
</tr>
<tr>
<td class="exd_field">{TF5}</td>
<td class="exd_entry">{EF5}</td>
</tr>
<tr>
<td class="exd_field">{TF6}</td>
<td class="exd_entry">{EF6}</td>
</tr>
<tr>
<td class="exd_field">{TF7}</td>
<td class="exd_entry">{EF7}</td>
</tr>
<tr>
<td class="exd_field">{TF8}</td>
<td class="exd_entry">{EF8}</td>
</tr>
<!-- <tr>
<td class="exd_field">{TF10}</td>
<td class="exd_entry">{EF10}</td>
</tr>
<tr> //-->
<td class="exd_field">{TF11}</td>
<td class="exd_entry">{EF11}</td>
</tr>
</table>
</div></div>
Could it be that I "destroyed" something that I shouldn't ?
(I changed the href to #self, this way on pages with loooooong tables it keeps the one selected visible, instead of going to the top again)
I
really wouldn't mine some more help regarding this!!
Thank you!!
Pedro Fardilha
Posted: Mon 8. May 2006, 18:07
by fardilha
Just an update:
My main browser is Firefox.
I just noticed that in IE it indeed hides the empty fields
Pedro fardilha
Posted: Mon 8. May 2006, 22:36
by breitsch
OK
the script does NOT really cut the empty entries, simply because for the script (or better said: for me
) it's impossible to predict what structure and form your private templates may have. Therefore it just cleans the remaining RT's after rendering with ExData-Content.
Firefox seems to apply the css kind of more strict than ie - meaning the script has problems when you use borders and padding/margin for the fields in css.
One solution for this would be the following (if someone has a better idea please post it here!):
the script looks for the RT: {EF#}
if there is no content for this RT we could tell the script to not display everything from e.g. <!--start_cut//--> before the RT till <!--end_cut//--> after the RT
so in your template a whole row would be cut with:
Code: Select all
<!--start_cut//--> <tr>
<td class="exd_field">{TF1}</td>
<td class="exd_entry">{EF1}</td>
</tr> <!--end_cut//-->
if this would solve your problem let me know, I could then add this functionality to the script.
p.s. in your template I would change the following:
Code: Select all
<span class="stretchtoggle" title="news" name="top"><a href="#self">linktext or RT</a></span>
so not the whole table appears as link in frontend
and
Code: Select all
<td class="exd_entry">{EF10}</td>
</tr> //-->
<tr>
<td class="exd_field">{TF11}</td>
close to the bottom