6.0.0-beta1
7/29/25

[#1608] Embed Polls outside Horde
Summary Embed Polls outside Horde
Queue Scry
Type Enhancement
State Rejected
Priority 1. Low
Owners
Requester mini (at) zaphod (dot) homeunix (dot) com
Created 03/22/2005 (7434 days ago)
Due
Updated 10/23/2005 (7219 days ago)
Assigned
Resolved 10/23/2005 (7219 days ago)
Milestone
Patch No

History
10/23/2005 11:54:38 AM Jan Schneider Comment #5
State ⇒ Rejected
Reply to this comment
No feedback.
03/23/2005 09:55:26 AM Jan Schneider Comment #4 Reply to this comment
An example for API methods? Take a look at the existing methods in 
lib/api.php.
03/23/2005 04:23:17 AM mini (at) zaphod (dot) homeunix (dot) com Comment #3 Reply to this comment
Can you give me a quick idea of where to look for examples of this? 
I'll write a full patch as soon as I have an idea where to start.
03/23/2005 12:05:53 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
This could be much cleaner and more flexible if you implement an API 
method to retrieve a single poll. You could then retrieve the poll 
through the RPC interface either by XMLRPC, SOAP, or REST.
03/22/2005 11:21:48 PM mini (at) zaphod (dot) homeunix (dot) com Comment #1
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Embed Polls outside Horde
Queue ⇒ Scry
New Attachment: vote.php.patch Download
Reply to this comment
It would be nice to be able to embed polls in pages outside Horde 
applications. The attached patch allows you to use code like:

<?php

$options['method'] = 'POST';

$params['url'] = $_SERVER['SCRIPT_URI'];

$params['embed'] = 'php';

$_POST['form_params'] = $params;

$_POST['poll_id'] = 1;

require_once 'HTTP/Request.php';

$http = &new 
HTTP_Request('http://zaphod.homeunix.com/horde/scry/vote.php', 
$options);

$http->addRawPostData($_POST);

$http->sendRequest();

if ($http->getResponseCode() != 200): echo 'Poll not available.';

else: echo $http->getResponseBody();

endif;

?>



There are still poblems with scry/lib/Driver.php when submitting a 
vote. I do not have a patch for that yet.

Saved Queries