Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Download Elxis CMS:
Elxis 5.5 Hermes
.
Home
Help
Login
Register
Elxis CMS Forum
»
Extensions
»
Bots and plugins
»
Photo Vote plugin
« previous
next »
Print
Pages: [
1
]
2
Author
Topic: Photo Vote plugin (Read 18636 times)
datahell
Elxis Team
Hero Member
Posts: 10371
Photo Vote plugin
«
on:
January 21, 2014, 09:54:17 »
I create a poll plugin in which poll options are images. I call this new Elxis 4.x extension
Photo Vote
.
It supports 3 types of polls:
1. Poll for articles (vote options: bad to excellent)
2. Poll for IOSR Hotels (vote options: bad to excellent)
3. Poll with custom options and images (vote options: up to 8 custom options).
I took the idea from site
palo.gr
(look at the main top area "Όλες οι αναφορές για τους υπουργούς στο διαδίκτυο"). Although the original is not a poll, what I will develop will be a poll that will look like what you see at palo.gr. You will click on an image to
vote
that option.
I believe this poll will be idea for create custom polls for
personalities
, trends, or
political parties
(elections are coming in EU... )
More information very soon!
«
Last Edit: January 21, 2014, 09:56:28 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
webgift
Elxis Team
Hero Member
Posts: 4194
Re: Photo Vote plugin
«
Reply #1 on:
January 21, 2014, 10:27:18 »
I think it will be a useful plugin. Bravo go go!!
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
jesusto
Jr. Member
Posts: 68
Re: Photo Vote plugin
«
Reply #2 on:
January 21, 2014, 15:23:09 »
It sounds great, Datahell!!
Logged
datahell
Elxis Team
Hero Member
Posts: 10371
Re: Photo Vote plugin
«
Reply #3 on:
January 21, 2014, 21:45:42 »
See attached an early preview of the
Photo Vote
plugin.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
webgift
Elxis Team
Hero Member
Posts: 4194
Re: Photo Vote plugin
«
Reply #4 on:
January 22, 2014, 09:49:49 »
I don't like as i can see
Panathinaikos
should be the first one. You do something wrong.
Please check this out!
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
datahell
Elxis Team
Hero Member
Posts: 10371
Re: Photo Vote plugin
«
Reply #5 on:
January 22, 2014, 14:17:32 »
The plugin is ready.
I will do an extensive check of it in the afternoon and then release it on EDC.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
datahell
Elxis Team
Hero Member
Posts: 10371
Photo Vote released
«
Reply #6 on:
January 22, 2014, 20:36:48 »
The
Photo Vote
plugin for Elxis 4.x was released and you can
download it from EDC
.
The plugin supports voting
Articles
,
IOS Reservations Hotels
and also allows you to create
Custom polls
.
Short description
Displays a poll where people can vote by clicking on an icon option. The plugin uses AJAX to count the voting and the bars are animated.
Features
5 options (Bad to Excellent) for Article / Hotel polls
Set the icons set to use on Article / Hotel polls.
Up to 8 options for custom polls. Each option can have a custom image and also custom bar colour.
Animated bars
Responsive design and mobile compatible
Option to display percentage or absolute values for votes.
Usage instructions - Articles
Integrate in WYSIWYG editor of Article's intro or main text:
{photovote}{/photovote}
Integrate in any WYSIWYG editor able to accept plugins (Article, Hotel, Content module, etc):
{photovote}article:X{/photovote}
where
X
the article ID to vote
Usage instructions - Hotels
Integrate in WYSIWYG editor of hotel's description text:
{photovote}{/photovote}
Integrate in any WYSIWYG editor able to accept plugins (Article, Hotel, Content module, etc):
{photovote}hotel:X{/photovote}
where
X
the hotel ID to vote
Usage instructions - Custom polls
Integrate in any WYSIWYG editor able to accept plugins (Article, Hotel, Content module, etc):
{photovote}Z{/photovote}
or
{photovote}custom:Z{/photovote}
where
Z
the poll ID to display
For custom polls please use the "Guided input" method.
WYSIWYG editor > Click the Elxis icon > Click "Guided input"
Download Photo Vote plugin
«
Last Edit: January 23, 2014, 12:27:11 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
webgift
Elxis Team
Hero Member
Posts: 4194
Re: Photo Vote plugin
«
Reply #7 on:
January 23, 2014, 10:43:44 »
Bravo!
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
striker
Newbie
Posts: 39
Re: Photo Vote plugin
«
Reply #8 on:
March 17, 2014, 16:09:19 »
datahell
This is a very nice and useful plugin.
How can I implement/show the photovote at the bottom of all articles without manually going into the WYSISYG editor?
Logged
datahell
Elxis Team
Hero Member
Posts: 10371
Re: Photo Vote plugin
«
Reply #9 on:
March 17, 2014, 20:14:14 »
Photo Vote
is a plugin which means that you integrate it within articles. In Elxis plugins can also be used inside instances of
module Content
. Not all plugins will work good with this method as some (like the
mini shop plugin
) require an article. If I remember correctly photo vote will not have any problem with this integration method. Test it. Create a new custom content module, add inside it the photo vote plugin and assign it in the template position you want.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
striker
Newbie
Posts: 39
Re: Photo Vote plugin
«
Reply #10 on:
March 18, 2014, 01:56:26 »
Hi datahell.
I was able to successfully implement the plugin based on your suggestion.
For the benefit of other users, here's how I did it.
1. Using the "custom content_module", I added the photovote parameter <
{photovote}{/photovote}
>, then at the mod_content parameter settings, I activated the plugin by choosing, "
Yes
"
2. I went into the template file (I used Tiara), and I called the module using the code <
$eDoc->module('mod_content');
>
and Viola! It worked like a charm.
P.S.
For those who are using English as their primary language, a little grammatical correction can be done for the poll question. Do this by going into, < ...
components/com_content/plugins/photovote/language/en.plugin_photovote.php
>, on line 31 you will see the question,
Did you liked this article? , proper way of constructing the question is;
Did you like, without 'd' since "did" already denotes the past tense form.
I am not a good php programmer nor an experienced one, so these are just some of the things that I can do to help the community....
testing the plugins and modules...
Thanks datahell
for the wonderful work!!
One last question though
, how will I disable the photovote from showing at the homepage? Any conditional statement I can use to make it work? I simply want to display the poll on the actual articles (
excluding
home, categories, and autonomous pages).
I tried injecting <
$eDoc->module('mod_content');
> into the
article.php
file but it failed and it caused to display a blank page.
Why would I want it to be this way? Because if a visitor would hit like from the homepage, it automatically follows that he/she liked all pages including all articles and categories, which I don't want to happen.
«
Last Edit: March 18, 2014, 02:27:20 by striker
»
Logged
datahell
Elxis Team
Hero Member
Posts: 10371
Re: Photo Vote plugin
«
Reply #11 on:
March 18, 2014, 08:39:23 »
Using $eDoc->module method for the content module is a
bad choice
as this module has, almost always, multiple instances. The
module
method will load the first instance of module content which might be an other one and not the one with the plugin. The proper method to add the module is by creating a module position (eg "myposition") and then load the position instead of loading the single module:
$eDoc->modules('myposition');
To include the photo vote plugin inside an article use the plugin integration code, not the module.
{photovote}X{/photovote}
Where
X
the poll id.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
striker
Newbie
Posts: 39
Re: Photo Vote plugin
«
Reply #12 on:
March 21, 2014, 10:08:41 »
datahell,
I was able to implement your suggestion, but why is it that inserting
$eDoc->modules('customposition');
into the article.html.php is not being accepted?
--------------------------------------*************************************-----------------------------------------
/*******************/
/* DISPLAY ARTICLE */
/*******************/
public function showArticle($row, $params, $chained=null, $comments=null, $print=0) {
if ((int)$params->get('popup_window') == 1) {
eFactory::getDocument()->loadLightbox();
}
<... more codes here...>
echo $this->makeImageBox($row, $params);
if (trim($row->subtitle) != '') { echo '<p class="elx_content_subtitle">'.$row->subtitle."</p>\n"; }
echo $row->text."\n";
echo '<div class="clear"></div>'."\n";
$eDoc->modules('customposition');
<-------- I want it right there.
Am I not doing it right?
Logged
webgift
Elxis Team
Hero Member
Posts: 4194
Re: Photo Vote plugin
«
Reply #13 on:
March 21, 2014, 11:09:25 »
As it seems document instance $eDoc has not been set! So you have to change your code to:
eFactory::getDocument()->modules('customposition');
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
striker
Newbie
Posts: 39
Re: Photo Vote plugin
«
Reply #14 on:
March 22, 2014, 06:33:13 »
Perfect!
Thank you so much webgift.
Logged
Print
Pages: [
1
]
2
« previous
next »
Elxis CMS Forum
»
Extensions
»
Bots and plugins
»
Photo Vote plugin