Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

User's Voice

Asked Modified Viewed 10,343 times
K
kneekoo
K
  • Senior Member, joined since
  • Contributed 289 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions
  • Answered 1 question
asked
Senior Member

[mp]433[/mp]
0 replies

14 posts

H
HobbyMan
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
answered
Veteran Member

Take it from me folks, this is a very cool infusion :)
0 replies
K
kneekoo
K
  • Senior Member, joined since
  • Contributed 289 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions
  • Answered 1 question
answered
Senior Member

:D Thanks!
0 replies
J
jikaka
J
jikaka 10
www.rusfusion.ru - russian nss
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 82 threads in the forums
answered
Veteran Member

good work:)
0 replies
H
Homdax
H
Homdax 10
  • Fusioneer, joined since
  • Contributed 2,247 posts on the community forums.
  • Started 108 threads in the forums
answered
Fusioneer

I just fired up a small task to make some improvements to this. By the looks of it you have done some fixing, Kneeko? Should it not be released as v. 1.1?
0 replies
K
kneekoo
K
  • Senior Member, joined since
  • Contributed 289 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions
  • Answered 1 question
answered
Senior Member

It does includes some fixes compared to the one we're using on Next but considering it wasn't released here I just used v1.0 and that's it. What improvements are we talking about?
0 replies
B
Borek
B
Borek 10
www.ddadc.com.pl - The Spiritual Adoption of Souls in Purgatory
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
answered
Newbie

I found error:

Parse error: syntax error, unexpected T_REQUIRE_ONCE in /var/www/virtual/my_site.pl/infusions/fusion_voice_panel/fusion_voice.php on line 1

What should I do?
Edited by Borek on 03-01-2012 00:17,
0 replies
K
kneekoo
K
  • Senior Member, joined since
  • Contributed 289 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions
  • Answered 1 question
answered
Senior Member

Download the package again - it's fixed now.

Explanation: At some point one of my editors saved the fusion_voice.php file in a strange format (bad line endings) and although the code inside was OK, it was saved on a single line. Some web servers could handle it, while others couldn't. So I fixed the line endings in that file and updated the infusion in the Add-on DB.

Nota bene: Nothing else is changed so there's no need for others to re-download the infusion but just in case they want to make sure they have a fully working version no matter where they might migrate their website, you will only have to replace fusion_voice.php and that's it.
0 replies
K
kneekoo
K
  • Senior Member, joined since
  • Contributed 289 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions
  • Answered 1 question
answered
Senior Member

Minor bug found on line #32 in /infusions/fusion_voice_panel/includes/func.php. It's only about sorting items but on the Accepted page items should be sorted down by the number of votes.

Original code snippet from line #23:

Quote

ORDER BY ".($project_status == 0 ? "tvp.project_votes"


Correct code snippet on line #23:

Quote

ORDER BY ".($project_status == 0 || $project_status == 2 ? "tvp.project_votes"


As this is only a minor bug it will be included in a future release of the infusion. If no other bugs/fixes/suggestions are reported by the end of January, version 1.1 will be published on February 1st.
0 replies
B
Borek
B
Borek 10
www.ddadc.com.pl - The Spiritual Adoption of Souls in Purgatory
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
answered
Newbie

It works great now. :) Thank you. B)
Regards.
0 replies
D
djdubuque
D
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

Quote

kneekoo wrote:

Minor bug found on line #32 in /infusions/fusion_voice_panel/includes/func.php. It's only about sorting items but on the Accepted page items should be sorted down by the number of votes.

Original code snippet from line #23:

Quote

ORDER BY ".($project_status == 0 ? "tvp.project_votes"


Correct code snippet on line #23:

Quote

ORDER BY ".($project_status == 0 || $project_status == 2 ? "tvp.project_votes"


As this is only a minor bug it will be included in a future release of the infusion. If no other bugs/fixes/suggestions are reported by the end of January, version 1.1 will be published on February 1st.


This doesn't look like my func.php file

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: func.php
| Version: 1.0, August 13, 2011
| Author: Ionescu Vlad (Senzo)
| Co-author: Nicolae Crefelean (kneekoo)
| Co-Co-author: Philip Daly (HobbyMan)
| Website: http://www.phpfusion.ro/
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { exit(); }

require_once INFUSIONS."fusion_voice_panel/includes/locale.php";

$voice_settings = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."voice_settings"));

function list_projects($project_status, $items_per_page = 5) {
   $items_per_page = preg_match("#[0-9]+#", $items_per_page) && $items_per_page > 0 ? $items_per_page : 5;
   global $userdata, $locale;
   if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
   $rows = dbcount("(project_id)", DB_PREFIX."voice_projects", "project_status = ".($project_status == 0 ? 1 : $project_status)."");
   if ($rows) {
      $query = dbquery("SELECT tvp.*, tu.user_name FROM ".DB_PREFIX."voice_projects tvp JOIN ".DB_PREFIX."users tu ON tvp.project_user = tu.user_id WHERE tvp.project_status = '".($project_status == 0 ? 1 : $project_status)."' ORDER BY ".($project_status == 0 ? "tvp.project_votes" : "tvp.project_datestamp")." DESC LIMIT ".$_GET['rowstart'].",".$items_per_page);
      echo "<div style='padding: 10px 0 10px 0'>\n";
      while ($p = dbarray($query)) {
         $description = strlen($p['project_description']) >= 500 ? trimlink($p['project_description'], 500) : $p['project_description'];
         $nr_com = dbcount("(comment_id)", DB_COMMENTS, "comment_type='FV' AND comment_item_id='".$p['project_id']."' ");
         $show_vote = iMEMBER ? true : false;
         echo "<table cellpadding='5' cellspacing='3' width='100%' align='center'><tr>\n";
         if ($project_status >= "3") {
            $final_votes = dbquery("SELECT project_votes FROM ".DB_PREFIX."voice_projects WHERE project_id = '".$p['project_id']."'");
            $x = dbarray($final_votes);
            $votes = $x['project_votes'];
            $show_vote = false;
         } else {
0 replies
D
djdubuque
D
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

Also, my Infusion works but does not show in my admin>infusions drop down menu. Also edit and delete do not work. I have to do this via dB.
0 replies
B
Borek
B
Borek 10
www.ddadc.com.pl - The Spiritual Adoption of Souls in Purgatory
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
answered
Newbie

@djdubuque - It should work:

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: func.php
| Version: 1.0, December 27th, 2011
| Author: Ionescu Vlad (Senzo)
| Co-author: Nicolae Crefelean (kneekoo)
| Co-Co-author: Philip Daly (HobbyMan)
| Website: http://www.phpfusion.ro/
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { exit(); }
require_once INFUSIONS."fusion_voice_panel/includes/locale.php";
$voice_settings = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."voice_settings"));

function list_projects($project_status, $items_per_page = 5) {
   $items_per_page = preg_match("#[0-9]+#", $items_per_page) && $items_per_page > 0 ? $items_per_page : 5;
   global $userdata, $locale;
   if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
   $rows = dbcount("(project_id)", DB_PREFIX."voice_projects", "project_status = ".($project_status == 0 ? 1 : $project_status)."");
   if ($rows) {
      $query = dbquery("SELECT tvp.*, tu.user_name FROM ".DB_PREFIX."voice_projects tvp JOIN ".DB_PREFIX."users tu ON tvp.project_user = tu.user_id WHERE tvp.project_status = '".($project_status == 0 ? 1 : $project_status)."' ORDER BY ".($project_status == 0 || $project_status == 2 ? "tvp.project_votes" : "tvp.project_datestamp")." DESC LIMIT ".$_GET['rowstart'].",".$items_per_page);
      echo "<div style='padding: 10px 0 10px 0'>\n";
      while ($p = dbarray($query)) {
         $description = strlen($p['project_description']) >= 500 ? trimlink($p['project_description'], 500) : $p['project_description'];
         $nr_com = dbcount("(comment_id)", DB_COMMENTS, "comment_type='FV' AND comment_item_id='".$p['project_id']."' ");
         $show_vote = iMEMBER ? true : false;
         echo "<table cellpadding='5' cellspacing='3' width='100%' align='center'><tr>\n";
         if ($project_status >= "3") {
            $final_votes = dbquery("SELECT project_votes FROM ".DB_PREFIX."voice_projects WHERE project_id = '".$p['project_id']."'");
            $x = dbarray($final_votes);
            $votes = $x['project_votes'];
            $show_vote = false;
         } else {
0 replies
K
kneekoo
K
  • Senior Member, joined since
  • Contributed 289 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions
  • Answered 1 question
answered
Senior Member

Quote

djdubuque wrote:

This doesn't look like my func.php file

As Borek said, it should work. I only posted a fragment of line #23 because I wanted to highlight the specific change. If you want to apply the update simply use the search feature of your editor and you will find the fragment I mentioned.

Quote

djdubuque wrote:

Also, my Infusion works but does not show in my admin>infusions drop down menu. Also edit and delete do not work. I have to do this via dB.

This infusion has been tested quite intensively and apart from the "unexpected T_REQUIRE_ONCE" bug reported earlier by Borek I have no reasons to believe the infusion would act this strange. Make sure your files have all been transfered properly by FTP, because partial transfers sometimes happen and in such cases it is normal to experience unexpected behaviour from the PHP scripts involved.

The files responsible for adding the link in the drop-down and the edit and delete features are:

Quote

/infusions/fusion_voice/infusion.php
/infusions/fusion_voice/voice_admin.php

1. Re-upload those two files (or all) AND make sure you don't have partial transfers.
2. The link to the infusion (drop-down + the infusions tab in Admin Panel) is only created when you infuse. If you defuse, all the data of the infusion will be deleted, so if you have suggestions do not defuse. Instead, preview this code in a custom page:
<?php
$result = dbquery("INSERT INTO ".DB_ADMIN." (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('FVP', '', 'User's Voice', '".INFUSIONS."fusion_voice_panel/voice_admin.php', '5')");
if ($result) {
   echo "Link successfully added to the infusions section.";
} else {
   echo "The link could not be added to the infusions section. Please check the <a href='".ADMIN."errors.php".$aidlink."'>error log</a> for details.";
}
?>
0 replies
— 30 days later —
K
kneekoo
K
  • Senior Member, joined since
  • Contributed 289 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions
  • Answered 1 question
answered
Senior Member

I forgot to mention that version 1.1 is available since February, as promised a few weeks ago.

Changes:
1. Fixed parse error in fusion_voice_panel/fusion_voice.php (bad line endings)
2. Fixed item sorting on Accepted page (fusion_voice_panel/includes/func.php)

There's no need to overwrite all the files or to re-infuse. You only need to overwrite the two files mentioned above and that will take care of it. I'll be here for more bug reports, improvement suggestions or praises. :)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 14 posts
  • Votes 0 votes
  • Topic users 6 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet