vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Add-On Releases - Donations Progress Image (Wiki lookalike) (https://vborg.vbsupport.ru/showthread.php?t=137348)

Mr Chad 01-31-2007 03:56 AM

you want both?

Ahsin1 01-31-2007 03:59 AM

yeh i want both

Mr Chad 01-31-2007 04:29 AM

find:
PHP Code:

$query_goals $vbulletin->db->query("SELECT * FROM ".TABLE_PREFIX."donation_goals WHERE active = '1' ORDER BY title ASC LIMIT 0,2");
while (
$row $vbulletin->db->fetch_array($query_goals)){
$amount $row['amount'];
$amount_formatted number_format($row['amount'], 2'.'',');
$goal_total $row['total_donated'];
$goal_total_formatted number_format($row['total_donated'], 2'.'',');
if (
$row['amount'] > 0){
  
$percentage round(($goal_total/$amount)*1002);
} else {
  
$percentage '0';
}


replace with:
PHP Code:

$amount 0;
$goal_total 0;
$query_goals $vbulletin->db->query("SELECT * FROM ".TABLE_PREFIX."donation_goals WHERE active = '1' ORDER BY title ASC LIMIT 0,2");
while (
$row $vbulletin->db->fetch_array($query_goals)){
$amount $amount $row['amount'];
$amount_formatted number_format($row['amount'], 2'.'',');
$goal_total $goal_total $row['total_donated'];
$goal_total_formatted number_format($row['total_donated'], 2'.'',');
if (
$row['amount'] > 0){
  
$percentage round(($goal_total/$amount)*1002);
} else {
  
$percentage '0';
}


i have not tested this so please respond with results.

Ahsin1 01-31-2007 04:43 AM

Working Perfect Thanks a lot for ur help :)

Mr Chad 01-31-2007 04:55 AM

Quote:

Originally Posted by Ahsin1 (Post 1171098)
Working Perfect Thanks a lot for ur help :)

glad to hear :D

masons 01-31-2007 05:22 AM

can I pay someone to fix mine up a little bit? I dont know how to make it appear on the left site column instead of at the top without it messing up the column width.

Also why is it showing $53 when it should be $20?

Mr Chad 01-31-2007 05:59 AM

Quote:

Originally Posted by masons (Post 1171112)
can I pay someone to fix mine up a little bit? I dont know how to make it appear on the left site column instead of at the top without it messing up the column width.

Also why is it showing $53 when it should be $20?

can you export your donation_goals table and post it here (from your database).

masons 01-31-2007 06:33 AM

Hi, Here it is!

Quote:

-- phpMyAdmin SQL Dump
-- version 2.9.0.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 31, 2007 at 01:32 AM
-- Server version: 5.0.24
-- PHP Version: 4.4.4
--
-- Database: `peter_mason`
--

-- --------------------------------------------------------

--
-- Table structure for table `donation_goals`
--

CREATE TABLE `donation_goals` (
`id` int(255) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`amount` decimal(10,2) NOT NULL default '0.00',
`total_donated` decimal(10,2) NOT NULL default '0.00',
`active` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `donation_goals`
--

INSERT INTO `donation_goals` (`id`, `title`, `description`, `amount`, `total_donated`, `active`) VALUES
(2, 'Running of servers', 'We like to think of this site as a community, as such we hope we can all share in the cost of running this.', '200.00', '0.00', 1);
Also, I really dont know how to make the information look better and placed in the left column, any advise is welcome!

Mr Chad 01-31-2007 02:10 PM

hmm did you CHMOD the image 777 ? because there seems to be no donations so there is no reason for it to say any amount of money. also connect the donation buttons to your goal or it will not be recorded. I'm not sure what you mean abt your left column.

frandy 02-01-2007 09:38 PM

Is it possible to change the color/style of the image? Like have a gradient in the background? change the positioning of the text etc?


All times are GMT. The time now is 03:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01073 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete