Author Topic: Vodes for Joomla 1.5  (Read 35842 times)

rakib

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #15 on: 23 August 2008, 18:03 »
Can you paste your code please ?

rakib

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #16 on: 23 August 2008, 18:10 »
Assume that  the file where you will write code for spending is spend.php, then both vodes_util.php and spend.php will be in the same directory

Excuse my fine PHP skills, where would you put the two files, is ti in the directory of the image component in your case? Are there any code additions to "call" these files? COuld you post all the steps you had to do to implement the vodes spending with your image component, please?

Thanks


It is actually difficult to give all the steps. Because spending depends on your needs. Different people spend vodes for different purpose and the code sould be changed accordingly. And it is really tough to spend vodes without some knowledge in PHP ( I believe )

rHickman

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #17 on: 23 August 2008, 19:09 »
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>

<? require_once('vodes_util.php');
$my = & JFactory::getUser();
$uid = $my -> id;
?>

<?php $vode->updateVodes($uid)?>

<img src="http://www.cre8tivecontrol.com/fixeruniverse/fixer_images/home_icon.png" alt="download" />


All i want to do is assign the function to a button to remove some credits from the user, Let's say 10.

rakib

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #18 on: 23 August 2008, 19:14 »
Code: [Select]
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>


<? require_once('vodes_util.php');
$my = & JFactory::getUser();
$uid = $my -> id;
?>

<?php $vode->updateVodes($uid)?>

<img src="http://www.cre8tivecontrol.com/fixeruniverse/fixer_images/home_icon.png" alt="download" />

All i want to do is assign the function to a button to remove some credits from the user, Let's say 10.


Should be

Code: [Select]
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>


<? require_once('vodes_util.php');
$my = & JFactory::getUser();
$uid = $my -> id;
$vode = new Vodes(); //  <----------- this line was missing ; need to instantiate Vodes class
?>

<?php $vode->updateVodes($uid)?>

<img src="http://www.cre8tivecontrol.com/fixeruniverse/fixer_images/home_icon.png" alt="download" />


rHickman

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #19 on: 23 August 2008, 19:33 »
Dont know what you did, but it worked. And I am greatly appreciative.
This would be great for actual 'doc' to include in package download if polished a bit


thanks a million

rakib

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #20 on: 23 August 2008, 19:46 »
Dont know what you did, but it worked. And I am greatly appreciative.
This would be great for actual 'doc' to include in package download if polished a bit


thanks a million


Welcome rHickman. I know what I did. I fixed the bug in your code  ;)

rHickman

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #21 on: 23 August 2008, 23:48 »
Im working to understand how you would apply this to a user who was to subscribing monthly via pay pal...


How is your system notified...

rakib

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #22 on: 24 August 2008, 06:08 »
My system don't require such concept of monthly  subscribed paypal user.

serge06

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #23 on: 01 December 2008, 18:44 »


Should be

Code: [Select]
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>


<? require_once('vodes_util.php');
$my = & JFactory::getUser();
$uid = $my -> id;
$vode = new Vodes(); //  <----------- this line was missing ; need to instantiate Vodes class
?>

<?php $vode->updateVodes($uid)?>

<img src="http://www.cre8tivecontrol.com/fixeruniverse/fixer_images/home_icon.png" alt="download" />



I am getting this error when this code is inserted into com_content inside the article:

Fatal error: Class 'JFactory' not found in /home/goswapor/public_html/mambots/content/mossnippet.php(61) : eval()'d code on line 2

where line 2 is: $my = & JFactory::getUser();
Any ideas?
Could anyone PlEASE post a complete example of Vodes spending  integrated into ANY component?
I have tried all the examples and getting nowhere. It is very sad to see a component with good reviews dying due to lack of practical examples of use.
Thanks



rakib

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #24 on: 02 December 2008, 07:21 »
what the version of your Joomla. I guess it is < 1.5. JFactory is introduced with Joomla 1.5. Can you please make sure your version.

serge06

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #25 on: 02 December 2008, 07:26 »
Joomla 1.0
I guess this explains.
What should then be the code?
Thanks

rakib

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #26 on: 02 December 2008, 07:36 »
Probably code should be like this
Code: [Select]
<? require_once('vodes_util.php');
//$my = & JFactory::getUser(); // <----- comment this line
$uid = $my -> id; // in Joomla 1.0 $my is a gloabal variable so would get the id automatically.
$vode = new Vodes();
?>
« Last Edit: 02 December 2008, 07:38 by rakib »

rewing

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #27 on: 19 January 2009, 10:24 »
Hi,rakib

Link is dead! could you upload again?

rakib

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #28 on: 23 January 2009, 02:58 »
Hi,rakib

Link is dead! could you upload again?


Hi which link did you mean for dead ? I can download vodes for Joomla 1.5 from the link http://joomlacode.org/gf/project/vodes/frs/

wc_r

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Vodes for Joomla 1.5
« Reply #29 on: 03 February 2009, 16:16 »
I have added in this code to the default.php article view on Joomla 1.5. THe vodes_util.php is in the dame directory as default.php. But when I try to view an article, it says

Call to undefined method Vodes::updateVodes()

Code I added -

Code: [Select]
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>


<? require_once('vodes_util.php');
$my = & JFactory::getUser();
$uid = $my -> id;
$vode = new Vodes();
?>

<?php $vode->updateVodes($uid)?>
<img rc="images/stories/folder_locked.png" />