FlashCMS 0.3 released (about time!!!) :)

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

FlashCMS 0.3 released (about time!!!) :)

Post by Fulvio Romanin »

Hi everyone
i had this free morning which i devoted to cleaning up my messy code to share with you my improvements in Fcms.
I removed some things i had made for custom projects, but if you want, i can add the code here later.

So this is v0.3, which features multilanguage and article listing and much more. I had my logorrhea working while commenting the code, so you can see that more in particular there.
You can download it at http://www.fulvioromanin.it/fcms/fcms_v0.3.zip

of course much love goes to Oliver, and to my friends Luca Malisan, VgSlag and ShizNit / EfFlash for help.

Feel free to pm me if you want. I can't assure you i'll have the time to help you with installation (yes, it's a tad complex, yet :( ), but i'd really really really love to find someone to help me thru the development of the code. To say one, Oliver has much kindly made the "variable" content part which would allow us to pass flash variables from within the page (the text size, or the position of an object, or whatever). That will be the next thing to work on. But since i have to pay bills in RL, i can't develop it full-time.

Ok, now download and let me know! :)

(jeez.... i hope i didn't remove anything important...)
Completeness is reached through subtraction, not through addition
micael
Posts: 7
Joined: Thu 24. Feb 2005, 05:47

Post by micael »

Great.
Let's have a look at it.
marcomoreira
Posts: 4
Joined: Sun 24. Jul 2005, 07:49
Location: Brazil
Contact:

Anyone help???

Post by marcomoreira »

Hey...

Sorry for asking but... have anyone tried this?
I'm having some trouble... so, I need a little help..

I only get an "Error!" on the title textarea of the swf... :(
But the site is up and running with phpwcms...

[]'s

Marco Moreira
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

hi
sorry for not replying your email; i was away some days and since i got back now i saw both your mail and this so i'm answering here

did you upload the article_xml.php and menu_xml.php files?
did you set inside of the menu component the proper address to your file? (like http://www.yoursite.com/menu_xml.php)?

let me know
F
Completeness is reached through subtraction, not through addition
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

but i'd really really really love to find someone to help me thru the development of the code
Hi Fulvio,
I've already -some time ago...here - ;) offered you a hand... (through a friend who is very handy with action script and php) but no reponse.
Are u still interested?

Cheers
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

of course i am :D

in the last months i've been busy like mad, but now i have a bit more time and i'm back into dev mode ;)
and yes, i'll appreciate your help

do you use messenger, skype or such?
Completeness is reached through subtraction, not through addition
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

Yes, skype & messenger.
messenger: kosse (kosse@yahoo.com)
skype/ don't remember my username (I'm @work, and skype's home)

But I must admit messenger "breaks my balls" (rompecoglione?) when I'm working ;)

I meet my friend on wednesday (I already talked to him about it and he was looking at fcms), maybe we can arrange something then?

And I guess, you must have been busy with rara splash thing (I've some friends from Brussels who went by van to see the festival :D

Cheers
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

well, i added you but looks like you're offline

latest dev from fcms fresh out of the mailbox: my new friend Gabriele has just made this chunk of code which is needed to make internal links: i mean; if i had two pages and i wanted to link one another from html text, it was actually a pain in the ass; now, thanks to gabriele, we have this script i paste which just parses html text and finds out the page number in the db; so we can actually make a new getVars function and load the new content too. Sounds good, does it? :D

------------------------------------------------------------
FCMS links thingy
code by Gabriele Venier, idea by Fulvio Romanin

//fake, hardcoded text. We'll use fcms loadvars to take stuff up.

var htmlContent="<FONT face='Tahoma'><FONT color='#ff2b00' size='21'><STRONG><IMG width='211' height='109' src='http://www.adbusters.org/home/board_211x109.jpg'>Cinema | Movies</STRONG><FONT color='#000000'><FONT size='9'><BR><STRONG><FONT size='12'>&nbsp;<BR></FONT>- YARD MOVEMENTS 2005 <BR></STRONG><FONT size='15'><STRONG><A href='/index.php?id=7,320,0,0,1,0'>Immagini video dal mondo del reggae</A></STRONG></FONT><BR>Ogni giorno dalle ore 15:00 presso la 'Tenda Incontri' <BR>A cura di Mimmo Pizzutilo <BR><BR><STRONG>- ROTOTOM NIGHT MOVIES 2005</STRONG> <BR><FONT size='15'><STRONG><A href='/index.php?id=7,322,0,0,1,0'>Visioni di madre terra fra ambiente e paesaggio. </A></STRONG></FONT><BR>Ogni notte dalle ore 02:00, presso la 'Tenda Incontri' <BR>A cura di Mimmo Pizzutilo <BR><BR><BR><BR></FONT></FONT></FONT></FONT>";

// function to go somewhere inside of fcms; might be replaced by a newly refreshed loadVars

function gotoURL(id){
trace(id);
}

//code replacement and stripping

function replaceUrl(doc:String):String{
var ref_doc, i, f, ts,txt, id, comma

ref_doc = doc.toLowerCase();
i = ref_doc.indexOf("<a");
if(i == -1)
return doc;

f = ref_doc.indexOf("</a>", i);
ts = doc.substring(i,f+4)

txt = ts.substring(ts.indexOf(">",1)+1, ts.indexOf("<", 1));

comma = ts.indexOf(",")
if(comma==-1)
return String(doc.slice(0,f+4)+arguments.callee(doc.slice(f+4)));

id = ts.substring(comma+1, ts.indexOf(",", comma+1))

return String(doc.slice(0,i)+"<A HREF=\"asfunction:gotoURL,"+ id +" \">"+ txt +"</A>"+arguments.callee(doc.slice(f+4)));
}

//text creation

_root.createTextField("content_tf", 0, 0,0,450,350);
_root.content_tf.multiline = true;
_root.content_tf.wordWrap = true;
_root.content_tf.html = true;
_root.content_tf.htmlText = replaceUrl(htmlContent);
Completeness is reached through subtraction, not through addition
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

so we can actually make a new getVars function and load the new content too. Sounds good, does it?
Yes, really cool! :lol:

Sorry bout messenger, was gone out to lunch... I will try to contact u on wednesday.

Cheers
marcomoreira
Posts: 4
Joined: Sun 24. Jul 2005, 07:49
Location: Brazil
Contact:

Post by marcomoreira »

did you upload the article_xml.php and menu_xml.php files?
did you set inside of the menu component the proper address to your file? (like http://www.yoursite.com/menu_xml.php)?
yeah... I set http://www.mysite.com.br/admin/menu_xml.php
and on the actionscript code I set http://www.mysite.com.br/admin

(http://www.mysite.com.br/admin is the phpwcms folder that I installed for testing purposes... and where I uploaded the SWF, article_xml.php and menu_xml.php)

menu_xml.php and article_xml.php, when I try to access via browser, returns the values... so, it's Ok, I think...
But the "Error!" on the title textarea is there...

There's another thing: on the browser, when I see the SWF, I know where's the menu but the "the text menu" is not displayed (only the background color that I set). This happened too when I click in any menu and a subsection appears (there's no text on the subsection menu).

[]'s
Marco Moreira.
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

this sometimes happens when you point out to a wrong id on the menu; did you configure properly the menu id's on the menu in the fla? e.g if the voices on the clickable menu id's are id=1, and id=2 you should point out to that

feel free to contact me via msn; if i'll be around, i'll try to help ;)
Completeness is reached through subtraction, not through addition
marcomoreira
Posts: 4
Joined: Sun 24. Jul 2005, 07:49
Location: Brazil
Contact:

hmmm...

Post by marcomoreira »

Uh... I thought I had understood all these id's... but now that I read your reply, I think I didn't... :D

Well, I added you as my contact in MSN. But I'll only have time to talk about next weekend... so on saturday or sunday, if you're online, I'll send you a message...

Anyway, I set some things on the actioscript like this: sectionid==1;sectionid==2;sectionid=3;sectionid=4;... where was the "dove siamo" example...
And I set on the actionscript button (the green one) as section=1... the "Error!" on title textarea dissapeared... but the two textareas was left blank... nothing was displayed, like the menu and the submenu/subsection...

I think it's just a little detail... right?
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

other stupid question - did you add the articles with text? ;)
Completeness is reached through subtraction, not through addition
marcomoreira
Posts: 4
Joined: Sun 24. Jul 2005, 07:49
Location: Brazil
Contact:

Yes...

Post by marcomoreira »

Yes... I created some articles on phpwcms with only plain text...
Like I said before, if I access menu_xml.php and article_xml.php via browser, I see the values... the title, the summary... etc...
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

html parser v1.1 with external links parsing

by gabriele venier, idea: me

// ---------------------------------------------------------------------
// sample text
// ---------------------------------------------------------------------

var htmlContent="<FONT face='Tahoma'><FONT color='#ff2b00' size='21'><STRONG><IMG width='211' height='109' src='http://www.adbusters.org/home/board_211x109.jpg'>Cinema | Movies</STRONG><FONT color='#000000'><FONT size='9'><BR><STRONG><FONT size='12'>&nbsp;<BR></FONT>- YARD MOVEMENTS 2005 <BR></STRONG><FONT size='15'><STRONG><A href='http://www.yourdomain.com/test.php?jkl= ... '>Immagini video dal mondo del reggae</A></STRONG></FONT><BR>Ogni giorno dalle ore 15:00 presso la 'Tenda Incontri' <BR>A cura di Mimmo Pizzutilo <BR><BR><STRONG>- ROTOTOM NIGHT MOVIES 2005</STRONG> <BR><FONT size='15'><STRONG><A href='/index.php?id=7,322,0,0,1,0'>Visioni di madre terra fra ambiente e paesaggio. </A></STRONG></FONT><BR>Ogni notte dalle ore 02:00, presso la 'Tenda Incontri' <BR>A cura di Mimmo Pizzutilo <BR><BR><BR><BR></FONT></FONT></FONT></FONT>";

// ---------------------------------------------------------------------
// loading functions
// ---------------------------------------------------------------------


function gotoURL(id){
trace("Getting a result in the same page with id number: "+id);
}

function winOpen(url){
trace("Opening new window to url: "+url);
}

// ---------------------------------------------------------------------
// parsing functions
// ---------------------------------------------------------------------


function replaceUrl(doc:String):String{
var ref_doc, i, f, ts,txt, id, http, comma, url

ref_doc = doc.toLowerCase();
i = ref_doc.indexOf("<a");
if(i == -1)
return doc;

f = ref_doc.indexOf("</a>", i);
ts = doc.substring(i,f+4)

txt = ts.substring(ts.indexOf(">",1)+1, ts.indexOf("<", 1));

http = ts.indexOf("http://");
if(http!=-1){
url = ts.substring(http, ts.indexOf(ts.substr(http-1, 1), http));
return String(doc.slice(0,i)+"<A HREF=\"asfunction:winOpen,"+ url +" \">"+ txt +"</A>"+arguments.callee(doc.slice(f+4)));
}

comma = ts.indexOf(",")
if(comma==-1)
return String(doc.slice(0,f+4)+arguments.callee(doc.slice(f+4)));

id = ts.substring(comma+1, ts.indexOf(",", comma+1))

return String(doc.slice(0,i)+"<A HREF=\"asfunction:gotoURL,"+ id +" \">"+ txt +"</A>"+arguments.callee(doc.slice(f+4)));
}

_root.createTextField("content_tf", 0, 0,0,450,350);
_root.content_tf.multiline = true;
_root.content_tf.wordWrap = true;
_root.content_tf.html = true;
_root.content_tf.htmlText = replaceUrl(htmlContent);

// thanks again to gabriele!! :D
Completeness is reached through subtraction, not through addition
Post Reply