HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Announce: Ecard

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#42535 (In Topic #9492)
Avatar

Community saint

SoccerDad's first addon - there goes the neighbourhood!

<sarcasm>LOL, I figure I'll tackle something easy first time out</sarcasm> so I'm going to attempt the creation of an Ecard Addon for OCP4 that works with gallery images. Purpose of this post is to gather requirements/suggestions from the OCP community as to what features/functions would make this a good addon. The baseline is to click "send ecard" when viewing a gallery image, but beyond that, I'd like to get your input as to what you'd like to see in it. I'm a complete amature coder so this could take months, however, I'm committed to getting it done, so damn the torpedoes, full speed ahead.

TIA!
SD


Last edit: by Chris Graham

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#42574
Avatar

Community saint

Good luck I would love to help you.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#44635
Avatar

Community saint

My plan is not as ambitious as your's, SoccerDad. I am simply trying to integrate an outside ecard system into my site.

The first problem I have encountered is that OCP4.0.5 seems to dislike the code. It keeps changing it all on its own.

For example, I start with this…

Code

<span class="ocp_keep">[block]main_comcode_page_children[/block]</span><div class="float_surrounder"><div align="center" style="width: 100%;">
<form name="ecard_form" method="post" action="http://ecardlogin.ecardsystem.com/ecardappl/sentecard/preview/" onsubmit="return check_length();">
    <table cellspacing="0" cellpadding="2" border="0" width="500">
        <tbody>
            <tr>
and OCP converts the code into this after some time…

Code

[semihtml] [block]main_comcode_page_children[/block]<div class="float_surrounder"><div align="center" style="width: 100%"><form

action="http://ecardlogin.ecardsystem.com/ecardappl/sentecard/preview/" method="post" name="ecard_form" onsubmit="return check_length();"><table

class="bordered_table"><tbody><tr><td><t
Anyone have any idea on how to force OCP to keep the code the way it is written?
Back to the top
 
Posted
Rating:
#44672
Avatar

Community saint

Hey psydoc! We may have to wait for Chris to comment on this; we too noticed OCP stripping/changing tags on us and my feeling is that it's something recent since I don't recall it happening in the past. Our issue was with ordered/unordered list tags (html, not comcode, using no wysiwyg editor) that were being stripped out partway down the document.`

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#44673
Avatar

Community saint

Hi ya SoccerDad. Since I posted last, I tried placing my code into a table, hoping that the comcode would not change the formatting, but…no joy.

I have noticed that OCP code does not like some of the tags, and I have gotten part of the code to render correctly by replacing the "<" with "[", but that has not solved the entire problem.

I'm sure that Chris will take one look and be able to solve what has taken me hours to even slightly understand.  :$

Ah, to be young and brilliant.  O_o  :lol:
Back to the top
 
Posted
Rating:
#44674
Avatar

Community saint

By George, I think I've got it…
<body>

<div align="center">
  <table align="center" width="500">
    <td><tr><form name="ecard_form" method="post" action="ht
That seems to hold the tags in place. It always broke before when the page was refreshed…it stay, now…and works.
Back to the top
 
Posted
Rating:
#44680
Avatar

Community saint

Excellent news psydoc!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#44683
Avatar

Community saint

I hope this helps, SoccerDad. I rebuilt the entire page as though it was a standard html page, and found that if I placed it in a body tag, it displayed correctly.  :)
Back to the top
 
Posted
Rating:
#44684
Avatar

Community saint

I just want an ecard system that uses the Gallery.
Is yours able to do that?

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#44686
Avatar

Community saint

I didn't place it in the gallery, amichan, but I don't know why it wouldn't work anywhere on the site.

All I did is create a child page using the comcode page feature and link to it from the front page.
Back to the top
 
Posted
Rating:
#44695
Avatar

I'm noting the conversation about (X)HTML being lost.

ocPortal tries to turn XHTML from the WYSIWYG editor into Comcode, to keep things neat/consistent/tidy. This can cause some problems if you're trying to write custom HTML. For those without privileges it also applies some security restrictions like stripping scripting.

There are a couple of different things you can do:
  • Turn off the WYSIWYG editor.
  • There's also a config option called "Convert XHTML to Comcode" which you can disable.

Also, if there are specific things ocPortal is breaking, we can also look into it because it could be a bug. I'll be looking into the code in this topic.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#44697
Avatar

Community saint

Thank you Chris. I did turn off the WYSIWYG editor. I think the problem was the convert xhtml to comcode. How do you disable that?
Back to the top
 
Posted
Rating:
#44700
Avatar

Community saint

Just for your records Chris, in our case, Convert XHTML is/was unchecked and no WYSIWYG editor in use. I will check the group permissions however to see if that was the culprit.

Psydoc: thanx for the heads up, appreciated.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#44704
Avatar

Community saint

You are welcome, SoccerDad. My solution may not be as elegant as what Chris will produce, but it works...and, with several people trying to break it...it still works. :)
Back to the top
 
Posted
Rating:
#44711
Avatar

Community saint

psydoc said

Thank you Chris. I did turn off the WYSIWYG editor. I think the problem was the convert xhtml to comcode. How do you disable that?
uh, em…please ignore that last question.  :$  Boy, do I feel like a dumah.
Back to the top
 
Posted
Rating:
#44718
Avatar

Just for your records Chris, in our case, Convert XHTML is/was unchecked and no WYSIWYG editor in use. I will check the group permissions however to see if that was the culprit.

It could be this too. If you have a reproducible bit of HTML that's breaking please do submit as a bug with the HTML inside a code tag and I'll investigate.

and OCP converts the code into this after some time

I am wondering if that last bit (bolded) could be a clue here. ocPortal doesn't apply the HTML->Comcode conversion except directly at the point of an edit being saved. Could someone else have passed the page through an edit (someone with the WYSIWYG editor on)?

I analysed the code fragments in post #44635 and they seem equivalent. These were the differences:
  • The ocp_keep span was stripped, but that's normal because it's only a temporary thing used by the WYSIWYG editor to highlight blocks in the code (it's how they're shown in red).
  • The white-space was different, but unless I missed something that doesn't change anything.
  • The tag parameters were alphabetised (ocPortal does that to help it in the conversion)
  • (I assume the discrepancy right at the end was because slightly different lengths were copy&pasted)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#44720
Avatar

Community saint

Chris said

    and OCP converts the code into this after some time…


I am wondering if that last bit (bolded) could be a clue here. ocPortal doesn't apply the HTML->Comcode conversion except directly at the point of an edit being saved. Could someone else have passed the page through an edit (someone with the WYSIWYG editor on)?

I analysed the code fragments in post #44635 and they seem equivalent. These were the differences:

    * The ocp_keep span was stripped, but that's normal because it's only a temporary thing used by the WYSIWYG editor to highlight blocks in the code (it's how they're shown in red).
    * The white-space was different, but unless I missed something that doesn't change anything.
    * The tag parameters were alphabetised (ocPortal does that to help it in the conversion)
    * (I assume the discrepancy right at the end was because slightly different lengths were copy&pasted)
Thanks for the clue. I am wondering if someone from my staff was trying to assist and did have the WYSIWYG editor on. That would explain why the "after some time".

The "discrepancy right at the end" was cause I did copy/paste different bits.

I'll have to look into setting up a different user group for staff so they can't assist me.  :$
Back to the top
 
Posted
Rating:
#44730
Avatar

Community saint

Thanks for the updates Chris. It wasn't a major issue for us and being the comcode freak that I am, we just switched to that instead. I will however keep an eye out and try a couple of tests and if I can reliably reproduce, I'll submit it as a bug with steps.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
There are too many online users to list.
Control functions:
 Add topic 

Quick reply   Contract

Your name:
Your message: