MyBB Community Forums

Full Version: Show Random Poll On The Portal?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi, is there a way to randomize polls on the portal?

What I mean is this, on my former host, the portal has a feature where it will show a random poll on the portal whenever the user refreshes the page.

This was useful because on my forum, I had a section designated for polls only, and this feature allowed us to choose which forums we'd want the portal to pull polls from. I had more than a thousand polls in the polls-only section alone. 

I do know that this was a feature the host admin added by using a code, and I was hoping that this would be possible to implement on this software too. 

If it isn't possible to do this, could this be a feature in later versions?

Thank you in advance for your time.
Perhaps using an array and then randomise it. Check into Template Conditionals. It's probably my favourite plugin.
Hi, Alexander, thank you for taking the time to respond, I greatly appreciate it. I will check out the plugin, however, I have no experience with coding what so ever..

Do you have instructions on how I could do this?

For example, where and what templates would I have to edit in order to accomplish this?

Thank you once again for the response.
Hi, I am still needing help with this, on my forum, I have a section dedicated to polls only and I really need the ability to show a random poll on refresh, so that a user that is checking out the portal, can participate if they choose to do so.

My previous host had this ability built in, and it was incredibly useful. There was a setting for it in the ACP, and all I had to do was specify which areas of the forum to pull the polls from.

I would also like the option to add the random poll box to the index page as a sidebar if possible.

I don't know anything about coding, at all, but I can follow instructions on editing files if need be, I just need someone to point me in the right direction. The above user mentioned a plugin but I have no idea what it does or how it works, but I just know that when I installed it, it didn't randomize the polls.

As always, I would greatly appreciate any help on this. Smile
I will help you, private message me your URL.
I have the following plugin :
https://github.com/Sama34/OUGC-Portal-Po...alpoll.php

However, it works with set polls only, but should be easy to achieve what you are looking for.

Drop me a message if you are interested on updating the plugin to meet your requirements.
(2024-03-08, 05:21 PM)Omar G. Wrote: [ -> ]I have the following plugin :
https://github.com/Sama34/OUGC-Portal-Po...alpoll.php

However, it works with set polls only, but should be easy to achieve what you are looking for.

Drop me a message if you are interested on updating the plugin to meet your requirements.

Thank you for the response, I installed the plugin from this link, but I can't activate it as there is no language file for admin folder.
This is what you're seeing?
https://snipboard.io/XiHAGL.jpg

You need to go to your cpanel and make that file path and insert the file its asking. 
It will look like this next

https://snipboard.io/MUlXTw.jpg

So now you need to put an asterisk inside the plugin file to make it look like this.
This plugin is for 1.6. So put * in the compatibility.

// Necessary plugin information for the ACP plugin manager.
function ougc_portalpoll_info()
{
	global $lang;
    $lang->load('ougc_portalpoll');

	return array(
		'name'			=> 'OUGC Portal Poll',
		'description'	=> $lang->ougc_portalpoll_d,
		'website'		=> 'http://udezain.com.ar/',
		'author'		=> 'Omar G.',
		'authorsite'	=> 'http://udezain.com.ar/',
		'version'		=> '1.0',
		'compatibility'	=> '*'
	);
}

Now you should have this:
https://snipboard.io/IBqaUg.jpg

Sometimes you have to troubleshoot these outdated plugins in order to get them to work. If you need any help please let me know.
Your first image was what I was seeing after I installed it, but after following your instructions, this is what I see now..

https://imgur.com/a/INr3FDq
you can't just edit a code safely ? how are you expecting to get rid of the errors! you have to just put a single '*' in compatibility but what you have done i can see , you have messed up with the plugin file while editing.
Pages: 1 2