PDA

View Full Version : WeVote - Development Log & Releases



Smudge
October 8th, 2011, 05:06
WeVote
Development Log & Releases

Created By: Smudge & ballin

Concept & Credits: Only the registered members can see the link.!
(I did re-use the Javascript for the time being, Planning to completely remake it though - so until I do, credits to the Creator of the Script in this thread)

What is WeVote

You've probably seen on most private server sites those Screen overlays with the reminder to vote. However some of them can be quite 'fugly' and get pretty annoying. However the concept of WeVote is to provide the same outcome but also make it a lot more user-friendly, less annoying and a little prettier.

What the Hell? It's only a Popup / Overlay!

That it is, for now. In the future I plan to add a lot more functionality to it, such as allowing the Owner to easily modify the vote site(s) it displays, showing how many people have voted in the last 24 hours (or today, depends) and some other fun bits and bobs.

WeVote Version & More

Current Version: 1.1
Current Release Version: 1.1

Developers: Smudge, ballin
Thanks To: Scotticus (Testing Pre-release), Twisted (Testing Pre-release), Anthony` (Brainstorming with me, Revising & Patching <3), Faab (Revising <3)

Current Release Version Download: Only the registered members can see the link.

Current Release Version Features

Screen Overlay and Reminder
Cookies (make it less annoying)
Small Size

Current Release Version Cons

Fails to overlay Applets, Flash etc - I don't advise you using it on Webclient pages etc
Has problems display with Google Adsense (unless the Ads are added to a Forum via the Admin CP etc)

Next Release Goals

Fix Applet Overlay Issue
Patch Display issue with Adsense
Add 'x People Voted Today'

Pre-Answered Questions



Will this be a Paid Release when it's Complete?
No, this will always be free.

Can I use this for my site?
Yes you can, Please report any bugs you find.

How do I add this?
Check out the usage guide below the Pre-Answered Questions.

Can I change the text in the footer?
I'd appreciate it if you didn't, however I can't stop you can I now?



Usage Guide

In the page you wish this to appear, put this in between the <head> tags.



<link href="wevote.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js-wevote.js"></script>
<script type="text/javascript">
var popup = new WeVote("wv_popup");
window.onload = function() {
popup.show();
};
</script>


Be sure to change the location of these scripts if you have them in different folders etc.

Put this at the bottom of the page you wish for the WeVote Popup to appear (Just above </body>)



<!-- WeVote Version 1.1 | Begin -->
<div id="wv_popup">
<div id="wv_top">Voting Reminder
<div class="wv_right"><img src="wv_assets/close_vote.png" onclick="popup.hide(false);" /></div>
</div>
<div id="wv_undertop">
Click the Following Image(s) below to Vote!
</div>
<div id="wv_sites">
<a href="Only the registered members can see the link.-yourserver.html" target="_blank">

<img
title="Vote"
src="wv_assets/runelocus.png" border="0"
alt="Click to Vote"
onclick="popup.hide(true);"
/>
</a>
</div>
<div>
<div id="wv_footer">Powered By WeVote Version 1.1</div>
</div>
</div>
<!-- WeVote Version 1.1 | End -->


Anything else? Nope, just make sure all of the locations are correct.

I have provided an example page (example.html) within the download. Scotticus has also allowed me to use his Forum as a Demo @ Only the registered members can see the link. (Version 1.0 RC1 - Outdated)

Enjoy!

D Escobar
October 8th, 2011, 05:09
Very nice, i love the look.... i will be using it in the near future :D thanks.

Scotticus
October 8th, 2011, 05:10
Thanks for using me as your test dummy :)

Smudge
October 8th, 2011, 05:16
Very nice, i love the look.... i will be using it in the near future :D thanks.

Let me know how it goes. :)


Thanks for using me as your test dummy :)

It was a pleasure, quite literally ;)

Texeh
October 8th, 2011, 05:25
good shit smudge <3

Smudge
October 8th, 2011, 05:28
good shit smudge <3

Thanks broski, <3 - So much to do still :3

CodyV20
October 8th, 2011, 05:42
Looks very nice. Will suggest it to those who are looking for one! :)

Smudge
October 8th, 2011, 05:57
Looks very nice. Will suggest it to those who are looking for one! :)

Thanks broski, it's appreciated. :)

Faab234
October 8th, 2011, 08:29
I've remade it a little bit.



/**
* WeVote version 1.1.
*
* @author Smudge
* @author Fabian M.
*/
(function WeVote(id) {
/**
* Time of the remember cookie.
*/
this.time = 1440;
/**
* Id of the element WeVote is stored in.
*/
this.id = id;
/**
* The DOM object of the popup.
*/
this.domObject = document.getElementById(this.id);
/**
* The name of the cookie we store the data in.
*/
this.cookie = 'dsrvote';

/**
* Default value of the cookie.
*/
this.cookieValue = 'true';
/**
* Determines if this popup should be remembered.
*
* @return <code>true</code> if the popup should be remembered,
* <code>false</code> otherwise.
*/
this.shouldRemember = function() {
var nameEQ = this.cookie + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ')
c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0)
return true;
}
return false;
};

/**
* Remember the popup.
*
* @param time The time to remember.
*/
this.remember = function(time) {
var date = new Date();
date.setTime(date.getTime()+(time*60*1000));
var expires = "; expires="+date.toGMTString();
document.cookie = this.cookie + "=" + this.cookieValue + expires
+ "; path=/";
};

/**
* Shows up the popup.
*/
this.show = function() {
if (this.shouldRemember())
this.domObject.style.display = "block";
};

/**
* Hides the popup.
*
* @param remember Determines if the popup should be remembered.
*/
this.hide = function(remember) {
if (remember)
this.remember(this.time);
this.domObject.style.display = "none";
this.domObject.innerHTML = "";
};

});

Pastebin: Only the registered members can see the link.

What do you think?

Smudge
October 8th, 2011, 08:35
I've remade it a little bit.



/**
* WeVote version 1.1.
*
* @author Smudge
* @author Fabian M.
*/
(function WeVote(id) {
/**
* Time of the remember cookie.
*/
this.time = 1440;
/**
* Id of the element WeVote is stored in.
*/
this.id = id;
/**
* The DOM object of the popup.
*/
this.domObject = document.getElementById(this.id);
/**
* The name of the cookie we store the data in.
*/
this.cookie = 'dsrvote';

/**
* Default value of the cookie.
*/
this.cookieValue = 'true';
/**
* Determines if this popup should be remembered.
*
* @return <code>true</code> if the popup should be remembered,
* <code>false</code> otherwise.
*/
this.shouldRemember = function() {
var nameEQ = this.cookie + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ')
c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0)
return true;
}
return false;
};

/**
* Remember the popup.
*
* @param time The time to remember.
*/
this.remember = function(time) {
var date = new Date();
date.setTime(date.getTime()+(time*60*1000));
var expires = "; expires="+date.toGMTString();
document.cookie = this.cookie + "=" + this.cookieValue + expires
+ "; path=/";
};

/**
* Shows up the popup.
*/
this.show = function() {
if (this.shouldRemember())
this.domObject.style.display = "block";
};

/**
* Hides the popup.
*
* @param remember Determines if the popup should be remembered.
*/
this.hide = function(remember) {
if (remember)
this.remember(this.time);
this.domObject.style.display = "none";
this.domObject.innerHTML = "";
};

});

Pastebin: Only the registered members can see the link.

What do you think?

Looks brilliant bro, cheers - will definitely use it and put you in the credits <3 Saved me quite a bit of work bro :3

Faab234
October 8th, 2011, 08:41
Looks brilliant bro, cheers - will definitely use it and put you in the credits <3 Saved me quite a bit of work bro :3

But, but, if you use my version you should put this in the head element:


<script type="text/javascript">
var popup = new WeVote("popupID");
window.onload = function() {
popup.show();
};
</script>

And when trying to hide the popup:


<div id="hide" onclick="popup.hide(true); // Will remember"></div>
<div id="hide" onclick="popup.hide(false); // Will not remember"></div>

Smudge
October 8th, 2011, 09:07
But, but, if you use my version you should put this in the head element:


<script type="text/javascript">
var popup = new WeVote("popupID");
window.onload = function() {
popup.show();
};
</script>

And when trying to hide the popup:


<div id="hide" onclick="popup.hide(true); // Will remember"></div>
<div id="hide" onclick="popup.hide(false); // Will not remember"></div>

Thanks again, I'll modify it when I wake up - pretty tired at the moment :)

Faab234
October 8th, 2011, 14:35
Thanks again, I'll modify it when I wake up - pretty tired at the moment :)

Updated the html for you:

Only the registered members can see the link.

Smudge
October 8th, 2011, 17:18
Updated the html for you:

Only the registered members can see the link.

Thanks broski, just woke up - working on it now.

Also ballin has joined the Development of this Project, future releases will be under FlexxityDesign. We have some pretty awesome ideas.

Acrylix
October 8th, 2011, 17:39
Is there like a live demo?

Smudge
October 8th, 2011, 17:42
Is there like a live demo?

Only the registered members can see the link.

Scott's forum is my test bunny at the moment. That's Version 1.0 - Soon as you close it, it'll create a cookie, if you want to see it again, just delete that cookie which is 'drsvote'.

Dean
October 8th, 2011, 17:43
Looks good Smudge! Good luck you guys. :)

Smudge
October 8th, 2011, 18:01
Looks good Smudge! Good luck you guys. :)

Thanks bro :3

Version 1.1 should be released sometime today. If anyone is using this on their website, let me know! ^.^

Anthony`
October 8th, 2011, 22:26
Looks awesome guys, nice to see a cool little idea taking off (especially in this section). :cool:

Smudge
October 8th, 2011, 22:39
WeVote 1.1 Released:

Only the registered members can see the link.

Update Log & New ReadMe file inside.

Special thanks to Faab & Anthony` for helping revise and patch files. Credits given within & on thread.

Voltimolt
October 9th, 2011, 01:44
you should make it that when users click outside the box, it will also exit the popup.

Smudge
October 9th, 2011, 02:03
you should make it that when users click outside the box, it will also exit the popup.

Yeah, I'm adding that in 1.2 as well as '# Users Voted Today' and maybe some sexy jQuery effects.

Voltimolt
October 9th, 2011, 04:24
1 Question.

Any PHP scripts included?

Smudge
October 9th, 2011, 04:45
1 Question.

Any PHP scripts included?

None whatsoever. We don't plan on using any either unless they are absolutely required.

ballin
October 9th, 2011, 04:54
1 Question.

Any PHP scripts included?

For this type of script, JavaScript would be more efficient than the use of PHP.

Voltimolt
October 9th, 2011, 08:56
Yeah, I'm adding that in 1.2 as well as '# Users Voted Today' and maybe some sexy jQuery effects.

Oh, if theres no PHP then I'd be interested to know how you'd do '# Users Voted Today'. Good Luck :)

Smudge
October 9th, 2011, 09:16
Oh, if theres no PHP then I'd be interested to know how you'd do '# Users Voted Today'. Good Luck :)

That's what I'm pondering about at the moment, I'll figure something out.

Faab234
October 9th, 2011, 10:53
Updated the code a little bit (Removed unless code, etc):

Only the registered members can see the link.

Smudge
October 13th, 2011, 22:20
Announcement: With the release of 1.2, Anthony` will be also helping - he'll be converting WeVote into an SMF Plugin. There will still be the option to download or use it the usual way, but seeing as we'll be adding a little bit of PHP and a tad of jQuery; we thought why not offer it as a plugin for forum platforms as well.

At first it will only be available to SMF, but hopefully later on we'll be able to expand to other forums such as vB, IPB, PhpBB, MyBB etc.

Look forward to 1.2 as it features:

- Vote counts for the last 24 hours
- Remind Me: Never, Tomorrow
- Different colour variations
- ACP (Possibly, not 100% sure on this yet)
- Tad bit of jQuery

Until then, feel free to use 1.1