Jump to content
  • 0

Add a new site to vote


FelipeMartins

Question


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

FluxCP Addon: Vote For Points

hello, can you help me add a new web site to vote?

 

 

Edited by estoudegreve
Link to comment
Share on other sites

22 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1577
  • Reputation:   243
  • Joined:  08/03/12
  • Last Seen:  

9 hours ago, estoudegreve said:

<?php if (!defined('FLUX_ROOT')) exit; ?>
<br/>
<h2>Add New Voting Site - Administrator</h2>
<?php if(count($error)>0): ?>
<h3>Error:</h3>
<ul>
	<?php foreach($error as $err){ ?>
		<li><?php echo $err; ?></li>
	<?php } ?>
</ul>
<?php endif; ?>
<form action="<?php echo $this->url ?>&return=add_site"  method="post" enctype="multipart/form-data" class="generic-form">
<table class="vertical-table" width="100%">
	<tr>
		<th align="left">
		<?php echo Flux::message('SITE_NAME_LABEL'); ?>						
		</th>
		<td>
			<input type="text" name="site_name" id="id_site_name" value="<?php echo $params->get('site_name'); ?>" placeholder="Enter Site Name" required="required" />
		</td>
	</tr>
	<tr>
		<th align="left">
		<?php echo Flux::message('ADDRESS_LABEL'); ?>						
		</th>
		<td>
			<input type="text" name="site_address" id="id_site_address"  value="<?php echo $params->get('site_address'); ?>" placeholder="Enter Site Name" required="required" />
		</td>
	</tr>
	<tr>
		<th align="left">
		<?php echo Flux::message('BANNER_LABEL'); ?>		
		</th>
		<td>
			<input type="file" name="banner_upload" id="id_banner_upload" value="<?php echo $params->get('banner_upload'); ?>" />
			<input type="checkbox" name="cbox_banner_url" id="id_cbox_banner_url" <?php if($params->get('cbox_banner_url')) echo "CHECKED"; ?>/><i>URL Banner:</i>
			<input type="text" name="banner_url" id="id_banner_url" value="<?php echo $params->get('banner_url'); ?>" placeholder="Enter Banner URL" <?php if($params->get('cbox_banner_url')) echo "ENABLED"; else echo "DISABLED"; ?>/>
			<br/>
			<i style="color:red">Allowed file types for file upload: <?php echo $file_types; ?></i>			
		</td>
	</tr>
	<tr>
		<th align="left">
		<?php echo Flux::message('BLOCK_TIME_LABEL'); ?>				
		</th>
		<td>
			<select name="blocking_hours" id="id_blocking_hours">
				<?php for($i = 1; $i<=24; $i++){ ?>
				<option value="<?php echo $i; ?>" <?php if($params->get('blocking_hours')==$i){ echo "SELECTED"; } ?>><?php echo $i; ?></option>
				<?php } ?>
			</select>
			<i>hr(s).</i>
			<select name="blocking_minutes" id="id_blocking_minutes">
				<?php for($i = 0; $i<=59; $i++){ ?>
				<option value="<?php echo $i; ?>" <?php if($params->get('blocking_minutes')==$i){ echo "SELECTED"; } ?>><?php echo $i; ?></option>
				<?php } ?>
			</select>
			<i>min(s).</i>
		</td>
	</tr>
	<tr>
		<th align="left">
		<?php echo Flux::message('POINTS_LABEL'); ?>						
		</th>
		<td>
			<input type="text" name="points" id="id_points"  value="<?php echo $params->get('points'); ?>" placeholder="Enter Points" required="required" />
		</td>
	</tr>
	<tr>
		<td colspan="2" align="right">
			<input type="reset" value="Clear"/>
			<input type="submit" name="Add" id="Add" value="Submit"/>
		</td>
	</tr>
</table>
</form>
<script type="text/javascript" language="javascript">
	$('#id_cbox_banner_url').change(function(){
		var checked = $(this).attr('CHECKED');
			$('#id_banner_url').attr('DISABLED',!checked);
			$('#id_banner_upload').attr('DISABLED',!!checked);			
	});
</script>

 

coisas.png

ok first...

go to fluxcp/modules/ and remove voteforpoints folder if there is any.
go to fluxcp/themes/default/ and remove voteforpoints folder if there is any

this step to makesure that voteforpoints folder only being read from fluxcp/addon/voteforpoints/ folder ONLY

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

You can add them in voteforpints page by loging in with admin account in your fluxcp 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

1 hour ago, Cyro said:

You can add them in voteforpints page by loging in with admin account in your fluxcp 

i tried, but nothing show! i see nothing.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

you have related sql tables in your db?

ie cp_v4p_sites cp_v4p_votelogs cp_v4p_voters 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

2 minutes ago, Cyro said:

you have related sql tables in your db?

ie cp_v4p_sites cp_v4p_votelogs cp_v4p_voters 

yes, but they are empty 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

can you post a screen shot how you are trying to add vote for points sites ?

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3127
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

Check your error logs in /data/logs/errors/exceptions/ and /data/logs/mysql/errors/ for something helpful.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

17 hours ago, Akkarin said:

Check your error logs in /data/logs/errors/exceptions/ and /data/logs/mysql/errors/ for something helpful.

nothing helpful.

 

guys! i need help please!!! please!!!

 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3127
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

21 hours ago, estoudegreve said:

guys! i need help please!!! please!!!

No one can help you unless we know what's wrong. Without an error code or anything to go with, it's almost impossible for us to help you.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

On 10/08/2017 at 4:24 PM, Akkarin said:

No one can help you unless we know what's wrong. Without an error code or anything to go with, it's almost impossible for us to help you.

how can I provide this information ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  404
  • Reputation:   245
  • Joined:  12/17/11
  • Last Seen:  

Enable debug mode in config/application.php and $showExceptions in config/error.php, then re-load the page.

If you can't figure it out, you could also consider adding vote sites manually by inserting the entries in the cp_v4p_sites table in SQL. The fields are pretty much self-exploratory. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1577
  • Reputation:   243
  • Joined:  08/03/12
  • Last Seen:  

On 8/9/2017 at 11:43 AM, estoudegreve said:

598a84ea3e62a_errorflux.png.f555388f9b5361e7682f8ad685661799.png

check your add.php for that voteforpoints in addon/voteforpoints/themes/default/voteforpoints/ folders. Is it coded or empty ?

Edited by Chaos92
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

<?php if (!defined('FLUX_ROOT')) exit; ?>
<br/>
<h2>Add New Voting Site - Administrator</h2>
<?php if(count($error)>0): ?>
<h3>Error:</h3>
<ul>
	<?php foreach($error as $err){ ?>
		<li><?php echo $err; ?></li>
	<?php } ?>
</ul>
<?php endif; ?>
<form action="<?php echo $this->url ?>&return=add_site"  method="post" enctype="multipart/form-data" class="generic-form">
<table class="vertical-table" width="100%">
	<tr>
		<th align="left">
		<?php echo Flux::message('SITE_NAME_LABEL'); ?>						
		</th>
		<td>
			<input type="text" name="site_name" id="id_site_name" value="<?php echo $params->get('site_name'); ?>" placeholder="Enter Site Name" required="required" />
		</td>
	</tr>
	<tr>
		<th align="left">
		<?php echo Flux::message('ADDRESS_LABEL'); ?>						
		</th>
		<td>
			<input type="text" name="site_address" id="id_site_address"  value="<?php echo $params->get('site_address'); ?>" placeholder="Enter Site Name" required="required" />
		</td>
	</tr>
	<tr>
		<th align="left">
		<?php echo Flux::message('BANNER_LABEL'); ?>		
		</th>
		<td>
			<input type="file" name="banner_upload" id="id_banner_upload" value="<?php echo $params->get('banner_upload'); ?>" />
			<input type="checkbox" name="cbox_banner_url" id="id_cbox_banner_url" <?php if($params->get('cbox_banner_url')) echo "CHECKED"; ?>/><i>URL Banner:</i>
			<input type="text" name="banner_url" id="id_banner_url" value="<?php echo $params->get('banner_url'); ?>" placeholder="Enter Banner URL" <?php if($params->get('cbox_banner_url')) echo "ENABLED"; else echo "DISABLED"; ?>/>
			<br/>
			<i style="color:red">Allowed file types for file upload: <?php echo $file_types; ?></i>			
		</td>
	</tr>
	<tr>
		<th align="left">
		<?php echo Flux::message('BLOCK_TIME_LABEL'); ?>				
		</th>
		<td>
			<select name="blocking_hours" id="id_blocking_hours">
				<?php for($i = 1; $i<=24; $i++){ ?>
				<option value="<?php echo $i; ?>" <?php if($params->get('blocking_hours')==$i){ echo "SELECTED"; } ?>><?php echo $i; ?></option>
				<?php } ?>
			</select>
			<i>hr(s).</i>
			<select name="blocking_minutes" id="id_blocking_minutes">
				<?php for($i = 0; $i<=59; $i++){ ?>
				<option value="<?php echo $i; ?>" <?php if($params->get('blocking_minutes')==$i){ echo "SELECTED"; } ?>><?php echo $i; ?></option>
				<?php } ?>
			</select>
			<i>min(s).</i>
		</td>
	</tr>
	<tr>
		<th align="left">
		<?php echo Flux::message('POINTS_LABEL'); ?>						
		</th>
		<td>
			<input type="text" name="points" id="id_points"  value="<?php echo $params->get('points'); ?>" placeholder="Enter Points" required="required" />
		</td>
	</tr>
	<tr>
		<td colspan="2" align="right">
			<input type="reset" value="Clear"/>
			<input type="submit" name="Add" id="Add" value="Submit"/>
		</td>
	</tr>
</table>
</form>
<script type="text/javascript" language="javascript">
	$('#id_cbox_banner_url').change(function(){
		var checked = $(this).attr('CHECKED');
			$('#id_banner_url').attr('DISABLED',!checked);
			$('#id_banner_upload').attr('DISABLED',!!checked);			
	});
</script>

 

coisas.png

Edited by estoudegreve
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

On 07/09/2017 at 11:02 PM, Chaos92 said:

ok first...

go to fluxcp/modules/ and remove voteforpoints folder if there is any.
go to fluxcp/themes/default/ and remove voteforpoints folder if there is any

this step to makesure that voteforpoints folder only being read from fluxcp/addon/voteforpoints/ folder ONLY

 

Works! but not perfect.

 

Notice: Undefined offset: 0 in /home/brasilra/public_html/addons/voteforpoints/modules/voteforpoints/index.php on line 44
votar.png.b7b67ec4063d9d9d4dce9687c8019973.png

 

 

When I try to click and vote doesn't works!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1577
  • Reputation:   243
  • Joined:  08/03/12
  • Last Seen:  

4 hours ago, estoudegreve said:

 

Works! but not perfect.

 

Notice: Undefined offset: 0 in /home/brasilra/public_html/addons/voteforpoints/modules/voteforpoints/index.php on line 44
votar.png.b7b67ec4063d9d9d4dce9687c8019973.png

 

 

When I try to click and vote doesn't works!

what do u fill in add voting sites ?

try with clean voteforpoints, paste it back. 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

01.png.c47d59131b56e19176ff0744cf1f9ccd.png

i did it a few times, cleanning and doing again

 

Edited by estoudegreve
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1577
  • Reputation:   243
  • Joined:  08/03/12
  • Last Seen:  

On 9/9/2017 at 10:39 PM, Felipe Martins said:

01.png.c47d59131b56e19176ff0744cf1f9ccd.png

i did it a few times, cleanning and doing again

 

Check my video tutorial here : 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

On 10/09/2017 at 10:28 PM, Chaos92 said:

Check my video tutorial here : 

 

59b8a0d168444_errovote.png.29868eb9a8546472054bcbb524436705.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1577
  • Reputation:   243
  • Joined:  08/03/12
  • Last Seen:  

17 hours ago, Felipe Martins said:

59b8a0d168444_errovote.png.29868eb9a8546472054bcbb524436705.png

use mysql

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

On 13/09/2017 at 5:48 PM, Chaos92 said:

use mysql

it doesn't make sense, why? 

 

how can i do it work with mariaDB?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

On 9/15/2017 at 9:40 AM, Felipe Martins said:

it doesn't make sense, why? 

 

how can i do it work with mariaDB?

I dont think so.there lot of work to do. Why dont you just use mysql instead?

Link to comment
Share on other sites

×
×
  • Create New...