We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG Polls ready for immediate commercial release!

Development and Programming

Andru Edwards's avatar
Andru Edwards
330 posts
17 years ago
Andru Edwards's avatar Andru Edwards

Leevi,

I have all those fields set up appropriately. However, I set them up AFTER I got that SQL error. So I got the error, realized I should have the Polls weblog and custom fields set up. I did that, but the SQL error isnt going away. I have attached three screenshots showing the setup.

Let me know how I can rectify this.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Hey drusoicy,

Go back into your admin and re-save your configuration. That should associate the custom fields with the config.

Cheers Leevi

       
Andru Edwards's avatar
Andru Edwards
330 posts
17 years ago
Andru Edwards's avatar Andru Edwards

You mean go into the admin area of the LG Polls module I assume? If so, that is the problem. When I go to Modules and click on LG Polls, that is where I get that SQL error. I can’t see any of the options or menus.

       
Andru Edwards's avatar
Andru Edwards
330 posts
17 years ago
Andru Edwards's avatar Andru Edwards

Actually, I figured it out on my own by browsing my History. I went directly to this URL:

http://www.gearlive.com/******/index.php?S=0&C=modules&M=Lg_polls&P=configuration

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Ok thats really interesting… If they are the same page I would have thought the same error would be seen. I’ll check the code anyway to see if there is a better way to capture the error.

Cheers

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Ah I get it… config and homepage… different 😊

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Ok I have added a line of code in the next version which checks for the field. If it does not exist then you are automatically redirected to the config page. 😊

       
Andru Edwards's avatar
Andru Edwards
330 posts
17 years ago
Andru Edwards's avatar Andru Edwards

Leevi,

Looks like I’m not out of the woods yet. I just went in to create my first poll, and upon submission, I get this error:

Notice: Undefined variable: LANG in /var/www/vhosts/*****/*****/*****/modules/lg_polls/lib/class.lg_polls.poll.php on line 325 Fatal error: Call to a member function line() on a non-object in /var/www/vhosts/*****/*****/*****/modules/lg_polls/lib/class.lg_polls.poll.php on line 325

Now what? 😊

       
Andru Edwards's avatar
Andru Edwards
330 posts
17 years ago
Andru Edwards's avatar Andru Edwards

Also, I have a suggestion for an easy way to add polls to weblog entries. What if the poll could be associated with weblog entry IDs? Then you could do something where you enter weblog entry ids separated by commas, and then those polls automatically show up in those entries since they are associated with them. Just a thought.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Ok can you change line 280 to:

global $DB, $SESS, $LANG;

in /modules/lg_polls/lib/class.lg_polls.poll.php

That will bring up an error message about your answers not saving correctly.

I’ll try and debug why they are not saving.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

On second thoughts… you may want to uninstall the module… This will not delete any poll data (you probably don’t have any yet 😊 ) and re-install it

Then you can save the config again and that should solve your issue momentarily.

       
franxx's avatar
franxx
33 posts
17 years ago
franxx's avatar franxx

superb poll tool.

One question to the “LG Polls: Head Tag” - if you want to hide your system folder. From the manual:

*  Copy system/modules/lg_polls/scripts/jquery-1.2.1.pack.js into your theme folder
* Move system/modules/lg_polls/scripts/lg_polls.js into your theme folder
* Hardcode the paths to these two files into your templates

Anyone knows, where to hardcode the lg_polls.js path? In the header of the page? Or which template?

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
about 17 years ago
Leevi Graham's avatar Leevi Graham
superb poll tool. One question to the “LG Polls: Head Tag” - if you want to hide your system folder. From the manual: * Copy system/modules/lg_polls/scripts/jquery-1.2.1.pack.js into your theme folder * Move system/modules/lg_polls/scripts/lg_polls.js into your theme folder * Hardcode the paths to these two files into your templates Anyone knows, where to hardcode the lg_polls.js path? In the header of the page? Or which template?

You can just throw it in the <head> tags of your site like a normal jaascript tag

       
simplyee's avatar
simplyee
104 posts
about 17 years ago
simplyee's avatar simplyee

I’m missing something simple here, as usual 😊.

How do we show the latest poll on the sidebar of a page? The entry id is required, so how can this be done without hard coding the entry number?

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
about 17 years ago
Leevi Graham's avatar Leevi Graham

Just loop through the Polls weblog and limit the entries to 1 😊

       
1 2 3 4

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.