Fwd: LC / WordPress / CGI challenge

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: LC / WordPress / CGI challenge

Richard Miller-5
I have someone building a WordPress website for me. I personally do not know WordPress. He doesn't know how to address the following issue. I know how to do much of it through Livecode, but I'm not sure how to integrate the two.

One feature of the site is that users get to input a rating on a particular matter. This cumulative rating is then displayed at the site.

The following items need to occur. I am very comfortable writing the back-end CGI code and processing it through LC.

1) when a given page is displayed, the cumulative rating needs to show on that page. How do I make a wordpress page initiate a CGI/LC script when that page is loaded, and display the result within a text block on that page?

2) what method can I use to limit one user from entering only one rating on a given matter? For example, I am asking users to rate a particular video on the basis of its believability. I don't want any one user to submit that rating on that particular video more than once, thereby skewing the results. Does this require me to force users to sign in with a username and password, then track that embedded information when they submit a rating, or is there an alternative which avoids signing in?

Thanks for any feedback.
Richard Miller


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: LC / WordPress / CGI challenge

Alex Tweedly
Disclaimer - I don't know much about Wordpress. But after Todd's
postings about it during the recent funding effort, I decided to go back
and try again to use it (previous attempts have failed in a myriad of
features that appear to be documented only on videos - the least
time-effective way to learn anything :-)
So my limited knowledge might be enough to be dangerous ,.,..


Use a Worpress plugin. There are many review / rating system plugins
that should do almost anything you want. I've not actualy used any of
them, but have browsed through the descriptions of some, and it looks
like they'll be able to do almost anything you're likely to want ...

-- Alex.

On 29/05/2016 15:51, Richard Miller wrote:

> I have someone building a WordPress website for me. I personally do
> not know WordPress. He doesn't know how to address the following
> issue. I know how to do much of it through Livecode, but I'm not sure
> how to integrate the two.
>
> One feature of the site is that users get to input a rating on a
> particular matter. This cumulative rating is then displayed at the site.
>
> The following items need to occur. I am very comfortable writing the
> back-end CGI code and processing it through LC.
>
> 1) when a given page is displayed, the cumulative rating needs to show
> on that page. How do I make a wordpress page initiate a CGI/LC script
> when that page is loaded, and display the result within a text block
> on that page?
>
> 2) what method can I use to limit one user from entering only one
> rating on a given matter? For example, I am asking users to rate a
> particular video on the basis of its believability. I don't want any
> one user to submit that rating on that particular video more than
> once, thereby skewing the results. Does this require me to force users
> to sign in with a username and password, then track that embedded
> information when they submit a rating, or is there an alternative
> which avoids signing in?
>
> Thanks for any feedback.
> Richard Miller
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: LC / WordPress / CGI challenge

Stephen Barncard-4
1. I wouldn't bother trying to do this simple task in PHP if I didn't have
to...

how about..

create a livecode server page with the rating/poll page and business logic
since you said you could do that ...  and easy to check and debug outside
WP.

and then use an IFRAME in the html
to display your content. Yes, Livecode (server) working inside a WP page.
everything shows from the Livecode server instance, including the CCS
inside the 'view port'.
<iframe>
</iframe>

http://www.w3schools.com/tags/tag_iframe.asp


2. use the IP of the visitor (available in the globals) to assure
uniqueness. Keep a list.

and for a double check use a "been here before" cookie/flag specifically
for this poll.

someone clever could hack it but it probably wouldn't be worth it.

Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, May 29, 2016 at 1:32 PM, Alex Tweedly <[hidden email]> wrote:

> Disclaimer - I don't know much about Wordpress. But after Todd's postings
> about it during the recent funding effort, I decided to go back and try
> again to use it (previous attempts have failed in a myriad of features that
> appear to be documented only on videos - the least time-effective way to
> learn anything :-)
> So my limited knowledge might be enough to be dangerous ,.,..
>
>
> Use a Worpress plugin. There are many review / rating system plugins that
> should do almost anything you want. I've not actualy used any of them, but
> have browsed through the descriptions of some, and it looks like they'll be
> able to do almost anything you're likely to want ...
>
> -- Alex.
>
>
> On 29/05/2016 15:51, Richard Miller wrote:
>
>> I have someone building a WordPress website for me. I personally do not
>> know WordPress. He doesn't know how to address the following issue. I know
>> how to do much of it through Livecode, but I'm not sure how to integrate
>> the two.
>>
>> One feature of the site is that users get to input a rating on a
>> particular matter. This cumulative rating is then displayed at the site.
>>
>> The following items need to occur. I am very comfortable writing the
>> back-end CGI code and processing it through LC.
>>
>> 1) when a given page is displayed, the cumulative rating needs to show on
>> that page. How do I make a wordpress page initiate a CGI/LC script when
>> that page is loaded, and display the result within a text block on that
>> page?
>>
>> 2) what method can I use to limit one user from entering only one rating
>> on a given matter? For example, I am asking users to rate a particular
>> video on the basis of its believability. I don't want any one user to
>> submit that rating on that particular video more than once, thereby skewing
>> the results. Does this require me to force users to sign in with a username
>> and password, then track that embedded information when they submit a
>> rating, or is there an alternative which avoids signing in?
>>
>> Thanks for any feedback.
>> Richard Miller
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: LC / WordPress / CGI challenge

Richard Miller-5
Thanks, Stephen.

Those two inclinations were what I was thinking as well. Thanks for
confirming.



On 5/29/16 4:52 PM, stephen barncard wrote:

> 1. I wouldn't bother trying to do this simple task in PHP if I didn't have
> to...
>
> how about..
>
> create a livecode server page with the rating/poll page and business logic
> since you said you could do that ...  and easy to check and debug outside
> WP.
>
> and then use an IFRAME in the html
> to display your content. Yes, Livecode (server) working inside a WP page.
> everything shows from the Livecode server instance, including the CCS
> inside the 'view port'.
> <iframe>
> </iframe>
>
> http://www.w3schools.com/tags/tag_iframe.asp
>
>
> 2. use the IP of the visitor (available in the globals) to assure
> uniqueness. Keep a list.
>
> and for a double check use a "been here before" cookie/flag specifically
> for this poll.
>
> someone clever could hack it but it probably wouldn't be worth it.
>
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
> On Sun, May 29, 2016 at 1:32 PM, Alex Tweedly <[hidden email]> wrote:
>
>> Disclaimer - I don't know much about Wordpress. But after Todd's postings
>> about it during the recent funding effort, I decided to go back and try
>> again to use it (previous attempts have failed in a myriad of features that
>> appear to be documented only on videos - the least time-effective way to
>> learn anything :-)
>> So my limited knowledge might be enough to be dangerous ,.,..
>>
>>
>> Use a Worpress plugin. There are many review / rating system plugins that
>> should do almost anything you want. I've not actualy used any of them, but
>> have browsed through the descriptions of some, and it looks like they'll be
>> able to do almost anything you're likely to want ...
>>
>> -- Alex.
>>
>>
>> On 29/05/2016 15:51, Richard Miller wrote:
>>
>>> I have someone building a WordPress website for me. I personally do not
>>> know WordPress. He doesn't know how to address the following issue. I know
>>> how to do much of it through Livecode, but I'm not sure how to integrate
>>> the two.
>>>
>>> One feature of the site is that users get to input a rating on a
>>> particular matter. This cumulative rating is then displayed at the site.
>>>
>>> The following items need to occur. I am very comfortable writing the
>>> back-end CGI code and processing it through LC.
>>>
>>> 1) when a given page is displayed, the cumulative rating needs to show on
>>> that page. How do I make a wordpress page initiate a CGI/LC script when
>>> that page is loaded, and display the result within a text block on that
>>> page?
>>>
>>> 2) what method can I use to limit one user from entering only one rating
>>> on a given matter? For example, I am asking users to rate a particular
>>> video on the basis of its believability. I don't want any one user to
>>> submit that rating on that particular video more than once, thereby skewing
>>> the results. Does this require me to force users to sign in with a username
>>> and password, then track that embedded information when they submit a
>>> rating, or is there an alternative which avoids signing in?
>>>
>>> Thanks for any feedback.
>>> Richard Miller
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: LC / WordPress / CGI challenge

Dave Kilroy
Richard, actually you might be better off with Alex's suggestion of a WP plugin.

iFrames in WP with .lc content work fine, but from within an iFrame I don't think there is a way for your Livecode Server script to access WP's data on the user/session and thence know whether a user has rated a particular film once, never or  100 times.

If you work within the WP ecosystem a plugin should be able to access relevant hooks to limit users use of your film ratings (depending on your requirements - are these guests or logged in WP users...)

In the past I worked with Simon Smith to create a 'code bridge' with a WooCommerce (within WP) transaction - and this continues to function nicely - but it is a lot of work and until Todd's library to access the WP API you're most likely better off working from within WP...

Kind regards

Dave
"The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time."
Peter M. Brigham
Reply | Threaded
Open this post in threaded view
|

re: Fwd: LC / WordPress / CGI challenge

Todd Fabacher
In reply to this post by Richard Miller-5
Hello Richard,

Rating Stars for WP - just doing an iFrame will not be that simple, because
you will need to transfer a good deal of info into calling iFrame. Plus you
will NOT be able to track the user.

I suggest using a WP plugin like this:
https://wordpress.org/plugins/rating-widget/. There are LOTS of them with
many many different options. This usually saves as a custom post type.

Because we hit the goal of $40K by last Friday, we are opening source our
LiveCode to WP REST API. We are preparing to put all the code online, but I
can send a version to you directly now if you wish. I can show you how to
pull the data directly from WP with just a few lines of code.  Here is the
blog post explaining what we are doing:
https://livecode.com/a-gift-from-the-community-for-the-community/

We are converting this into a script only stack and finishing the WP
Gravity Form maker.

--Todd
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode