[ABD] Advanced Show Poll Voters 1.0.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
nielsvo
Registered User
Posts: 15
Joined: Tue Oct 09, 2012 9:26 pm

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by nielsvo »

I am not an expert at all, but if the version check is done in below section, in /includes/acp/acp_poll_results.php, then I guess I know why I get this error on the version in the ACP:

$info = get_remote_file('www.phpbbsaske.espartan3ds.com', '/foro/aspv', 'aspv.txt', $errstr, $errno);

This file http://www.phpbbsaske.espartan3ds.com/f ... v/aspv.txt does not exist, this link directs to a fake commercial website :shock:
Am I the only one suffering from this?
I think I am going to uninstall this MOD again, it seems this release candidate is not ready yet like this. Real pity...Saske1: how can we help?
Danilotanic
Registered User
Posts: 12
Joined: Sat Oct 20, 2012 4:29 pm

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by Danilotanic »

Hi,

This mod sounds great.
I am running into a problem. :(
I have a style installed: Commun, which is different from what you have it running on which is pro silver
I did all the steps in the install.xml and was told that everything installed successfully after I ran install.php
I did run into this issue though:
When I tried to get into a topic it gave me this error:
"Parse error: syntax error, unexpected ';', expecting ')' in /home/dantan83/seriousavers.com/install/viewtopic.php on line 937"

I meddled around a little bit and tried dong everything again but the only thing that would change is the line # which would change to 868.

Since I was running Commun style I kind of changed things around and modded the "styles/Commun/template/viewtopic_body.html" instead of "styles/prosilver/template/viewtopic_body.html"

Luckily I backed up all the files I was edition, since I dont really know what I am doing :oops: and now I am on the verge of uninstalling the mod and replacing the files I edited back to the original.

Is there anything I missed? do I need to uninstall and not use this mod or possibly just uninstall and reinstall again. I have already uninstalled and reinstalled with the "styles/prosilver/template/viewtopic_body.html" exactly how install.xml said it should be and I deactivated Commun style and activated prosilver. I m still getting the same error.

HELP PLEEEEEEASE :? :? :?

update: I removed all the extra text installed AutoMod, used AutoMod to install Advanced Show Poll Voters 1.0.0 and followed all the directions. Nothing new was showing up in permissions - view who voted in polls or whatever the new permission is called. I also got the same issue as above. I am starting to think that this mod cannot work on my forum. I also deactivated all but prosilver and installed the mod. Same error :-( If anyone has any input I would greatly appreciate it.
Cheers.
nielsvo
Registered User
Posts: 15
Joined: Tue Oct 09, 2012 9:26 pm

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by nielsvo »

Replacing the last ";" by "," in
'POLL_OPTION_RESULT_PERMISSION' => ($config['poll_results_enable'] && $auth->acl_get('f_poll_results', $forum_id)) ? true : false, should solve your error when following the instructions literally (except for this one). I found out myself the instructions were wrong here. Easy to solve if you have some programming experience, but for a RC MOD I think this should not be necessary :roll:
Danilotanic
Registered User
Posts: 12
Joined: Sat Oct 20, 2012 4:29 pm

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by Danilotanic »

Thank you for the reply and your help but I dont seem to be having any luck with this mod. I got it not to give the error once I mad the change you told me to make but I didnt have any new permissions in my ACP and it looked as if I didnt even have the mod installed on the site. I was logged as the founder so i should have seen who voted for what. :? Oh well. Its too bad as it would have been very useful for my site. Guess I will have to find my way around. I will keep an eye on this topic. Who knows.... Maybe one day i can run this mod on my site too :lol:

Thanx again for your help
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by Oyabun1 »

I'm guessing you didn't run the /install.php file after making the file changes, that is what adds the permission amongst other things. Navigate your browser to http://www.yourdomain.tld/yourforum/install.php
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
Danilotanic
Registered User
Posts: 12
Joined: Sat Oct 20, 2012 4:29 pm

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by Danilotanic »

I did. I followed the instructions from the modx.prosilver.xml and did everything manually. then uninstalled everything as it didnt work. then I tried automod and installed it that way.... same. Then I got nielsvos reply and did the automod thing, edited viewtopic.php, didnt work then uninstalled and manually made sure that everything was removed then installed it again manually with the correction nielsvo pointed out ran the install and everything and still nothing. I had that red banned say you will have new permissions and nothing. I hope I didnt look in the wrong place. I went into group forum permissions - like an earlier reply stated, cleared cache and nothing. I dont get the permission. I did not get the error this time though :-D I guess its a step in the right direction :-D

I guess I will uninstall and reinstall again and again untill it works or just give up not sure yet. I am still willing to try anything you guys suggest :lol:
User avatar
GCypher
Registered User
Posts: 19
Joined: Fri Jul 29, 2005 11:31 am
Location: In Your Mind

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by GCypher »

The install file is actualy is not updating and will not update the tables, thats why u cannot see in the ACP Permissions. So ive found the solution and works with updated install file and will add the table in DB was missing in the previous install file, first download here:
https://github.com/phpbb-saske/Advanced ... oll_Voters

Then just reupload only the file: install.php via FTP
E.g: http://www.yourforum/install.php

After run again the install.php and choose unnistall option, after run once again install.php and "voila" u will see the Permission option after in ACP :)
As i said was outdated and the author of the mod forgot to post that update here :)
Evostrix Professional Web Hosting:
VPS/Semi Dedicated/Dedicated/Shared Hosting Plans/OpenVZ VPS Etc
Cheap & Professional Web hosting
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by Jessica »

GCypher wrote:The install file is actualy is not updating and will not update the tables, thats why u cannot see in the ACP Permissions. So ive found the solution and works with updated install file and will add the table in DB was missing in the previous install file, first download here:
https://github.com/phpbb-saske/Advanced ... oll_Voters

Then just reupload only the file: install.php via FTP
E.g: http://www.yourforum/install.php

After run again the install.php and choose unnistall option, after run once again install.php and "voila" u will see the Permission option after in ACP :)
As i said was outdated and the author of the mod forgot to post that update here :)
That worked

Now there's another issue. all the voting times are "December 31st, 1969, 8:00 pm". Anyone else have this issue? Or know how to fix this??


EDIT: Also, I don't think the ACP is showing all the polls. There are 11 polls in the ACP for me, and there are supposed to be more --- MANAGED TO FIX THIS..I think
Last edited by Jessica on Wed Oct 31, 2012 8:34 pm, edited 1 time in total.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by Jessica »

There's also a problem with the version check. The version says this:
here
" title="More information »" style="color: #BC2A4D;" onclick="window.open(this.href);return false;">1.0.0
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
nielsvo
Registered User
Posts: 15
Joined: Tue Oct 09, 2012 9:26 pm

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by nielsvo »

Jessica wrote:That worked

Now there's another issue. all the voting times are "December 31st, 1969, 8:00 pm". Anyone else have this issue? Or know how to fix this??

EDIT: Also, I don't think the ACP is showing all the polls. There are 11 polls in the ACP for me, and there are supposed to be more --- MANAGED TO FIX THIS..I think
How did you fix the missing polls from the ACP? If I create new polls now, these are not being updated in the ACP.

I also had the issue with the voting times.

I am running subsilver2, how can I make the votes visible in the poll itself? The following contrib part from Saske1 for the subsilver2 view_topic.html does not seem to do anything (and I did clear caches):

Open: styles/subsilver2/template/viewtopic_body.html
Find
Tip: This may be a partial find and not the whole line.

Code:Select all
<td class="gensmall" valign="top"><b title="{L_POLL_VOTED_OPTION}">x</b></td>
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.

Code:Select all
<!-- IF .poll_option && poll_option.POLL_OPTION_RESULT_PERMISSION -->{poll_option.POLL_OPTION_VOTERS}<!-- ENDIF -->
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by Jessica »

nielsvo wrote:
Jessica wrote:That worked

Now there's another issue. all the voting times are "December 31st, 1969, 8:00 pm". Anyone else have this issue? Or know how to fix this??

EDIT: Also, I don't think the ACP is showing all the polls. There are 11 polls in the ACP for me, and there are supposed to be more --- MANAGED TO FIX THIS..I think
How did you fix the missing polls from the ACP? If I create new polls now, these are not being updated in the ACP.

I also had the issue with the voting times.

I am running subsilver2, how can I make the votes visible in the poll itself? The following contrib part from Saske1 for the subsilver2 view_topic.html does not seem to do anything (and I did clear caches):

Open: styles/subsilver2/template/viewtopic_body.html
Find
Tip: This may be a partial find and not the whole line.

Code:Select all
<td class="gensmall" valign="top"><b title="{L_POLL_VOTED_OPTION}">x</b></td>
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.

Code:Select all
<!-- IF .poll_option && poll_option.POLL_OPTION_RESULT_PERMISSION -->{poll_option.POLL_OPTION_VOTERS}<!-- ENDIF -->
Not sure if my fix is good or if it causes any other problems -- so far it doesn't, but I can't be too sure. I pretty much changed includes/acp/acp_polls_results.php. I'll post it here
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
nielsvo
Registered User
Posts: 15
Joined: Tue Oct 09, 2012 9:26 pm

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by nielsvo »

There seems to be an error in the includes/acp_polls_results.php file. This file is a slightly modified version of the original created by FladeX in his polss_results_fx mod.
When I copy the original FladeX acp_polls_results.php file, I do see all polls correctly. I will check further but as said before I am not an expert, but coming closer and closer step by step ;)
If anyone has an idea what needs to be changed: advice welcome :)
nielsvo
Registered User
Posts: 15
Joined: Tue Oct 09, 2012 9:26 pm

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by nielsvo »

Got it working I guess :P (at least the ACP part where I can see now all polls and voters results)
I toke the include/acp/acp_polls_result.php file from FladeX MOD (see topic) and only appended the part on the version check from Saske1 (version check is working now again it seems).

After:

Code: Select all

	                	$db->sql_freeresult($result);
		       break;
		}
Insert:

Code: Select all

add_form_key('acp_poll_results');
		$user->add_lang('acp/common');
		
		// Version Check
		$config['ASPV_VERSION']         = (isset($config['ASPV_VERSION']))         ? $config['ASPV_VERSION']         : '1.0.0';
		$submit = (isset($_POST['submit'])) ? true : false;
		if ($submit)
		{
			if (!check_form_key('acp_poll_results'))
			{
				trigger_error('FORM_INVALID');
			}

			    set_config('poll_results_enable', request_var('poll_results_enable', 1));

			trigger_error($user->lang['SAVED'] . adm_back_link($this->u_action));
		}
		
		$template->assign_vars(array(
			'S_POLL_RESULTS_ENABLE'      => $config['poll_results_enable'],
			'U_ACTION'    => $this->u_action,
			'ASPV_VERSION'            => $config['ASPV_VERSION'],
			'S_VERSION_UP_TO_DATE'      => $this->shareon_version_compare($config['ASPV_VERSION']),
		));	
	
	}
/**
* Obtains the latest version information
* @param string    $current_version    version information
* @param int       $ttl             Cache version information for $ttl seconds. Defaults to 86400 (24 hours).
*
* @return bool       false on failure.
**/
   function shareon_version_compare($current_version = '', $version_up_to_date = true, $ttl = 86400)
   {
      global $cache, $template;
      
      $info = $cache->get('aspv_versioncheck');

      if ($info === false)
      {
         $errstr = '';
         $errno = 0;

         $info = get_remote_file('www.phpbbsaske.espartan3ds.com', '/foro/aspv', 'aspv.txt', $errstr, $errno);
         if ($info === false)
         {
            $template->assign_var('S_VERSIONCHECK_FAIL', true);
            $cache->destroy('aspv_versioncheck');
         }
      }

      if ($info !== false)
      {
         $cache->put('aspv_versioncheck', $info, $ttl);
         $latest_version_info = explode("\n", $info);

         $latest_version = strtolower(trim($latest_version_info[0]));
         $current_version = strtolower(trim($current_version));
         $version_up_to_date = version_compare($current_version, $latest_version, '<') ? false : true;

         $template->assign_vars(array(
            'U_VERSIONCHECK'   => ($version_up_to_date) ? false : $latest_version_info[1],
         ));
      }

      return $version_up_to_date;
   }

}
Only thing I would like to see working now is showing the result of the poll in the topic itself in subsilver2 style. This does not work in current MOD for me (no idea why :? ).
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by Jessica »

nielsvo wrote:Got it working I guess :P (at least the ACP part where I can see now all polls and voters results)
I toke the include/acp/acp_polls_result.php file from FladeX MOD (see topic) and only appended the part on the version check from Saske1 (version check is working now again it seems).

After:

Code: Select all

	                	$db->sql_freeresult($result);
		       break;
		}
Insert:

Code: Select all

add_form_key('acp_poll_results');
		$user->add_lang('acp/common');
		
		// Version Check
		$config['ASPV_VERSION']         = (isset($config['ASPV_VERSION']))         ? $config['ASPV_VERSION']         : '1.0.0';
		$submit = (isset($_POST['submit'])) ? true : false;
		if ($submit)
		{
			if (!check_form_key('acp_poll_results'))
			{
				trigger_error('FORM_INVALID');
			}

			    set_config('poll_results_enable', request_var('poll_results_enable', 1));

			trigger_error($user->lang['SAVED'] . adm_back_link($this->u_action));
		}
		
		$template->assign_vars(array(
			'S_POLL_RESULTS_ENABLE'      => $config['poll_results_enable'],
			'U_ACTION'    => $this->u_action,
			'ASPV_VERSION'            => $config['ASPV_VERSION'],
			'S_VERSION_UP_TO_DATE'      => $this->shareon_version_compare($config['ASPV_VERSION']),
		));	
	
	}
/**
* Obtains the latest version information
* @param string    $current_version    version information
* @param int       $ttl             Cache version information for $ttl seconds. Defaults to 86400 (24 hours).
*
* @return bool       false on failure.
**/
   function shareon_version_compare($current_version = '', $version_up_to_date = true, $ttl = 86400)
   {
      global $cache, $template;
      
      $info = $cache->get('aspv_versioncheck');

      if ($info === false)
      {
         $errstr = '';
         $errno = 0;

         $info = get_remote_file('www.phpbbsaske.espartan3ds.com', '/foro/aspv', 'aspv.txt', $errstr, $errno);
         if ($info === false)
         {
            $template->assign_var('S_VERSIONCHECK_FAIL', true);
            $cache->destroy('aspv_versioncheck');
         }
      }

      if ($info !== false)
      {
         $cache->put('aspv_versioncheck', $info, $ttl);
         $latest_version_info = explode("\n", $info);

         $latest_version = strtolower(trim($latest_version_info[0]));
         $current_version = strtolower(trim($current_version));
         $version_up_to_date = version_compare($current_version, $latest_version, '<') ? false : true;

         $template->assign_vars(array(
            'U_VERSIONCHECK'   => ($version_up_to_date) ? false : $latest_version_info[1],
         ));
      }

      return $version_up_to_date;
   }

}

EDIT: I think that's what I did too, but I also added in some other edits...

EDIT #2: I used a fresh includes/acp/acp_polls_results.php from Poll Results FX and did your edit, and now the version check is working. Wasn't working for me before
Only thing I would like to see working now is showing the result of the poll in the topic itself in subsilver2 style. This does not work in current MOD for me (no idea why :? ).
Did you set permissions correctly?




...now we just need to fix the voting time problem :/
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
nielsvo
Registered User
Posts: 15
Joined: Tue Oct 09, 2012 9:26 pm

Re: [RC] Advanced Show Poll Voters 1.0.0

Post by nielsvo »

Right... :oops:
After setting permissions correctly it is working. But still not completely as expected. The poll results shows on top of the poll options now only the names of the voters that have chosen the same option one has voted for him/herself. If other users voted for other options, these users are not listed

Image

I want to see the full list of users that have voted for each option, per option. So in the screenshot above the 5 other users should have been listed as well. Like in AgentStinger's earlier post in this topic: viewtopic.php?f=70&t=2128061&start=15#p13043520

How to do this in Subsilver2?

PS: Time is working for me now after the code change as adviced by Shorty1968. Of course only for new votes after change.

Return to “[3.0.x] Abandoned MODs”