Search found 12 matches

by macbloke
Sun Feb 24, 2008 8:45 pm
Forum: Joombie Coding Q/A
Topic: J!1.5 - Dynamic Images
Replies: 0
Views: 271

J!1.5 - Dynamic Images

Hi, Is there a way to dynamically generate an image from a PHP script? I have a script that takes a variable in, uses it to get information from the DB, runs through a script and produces a PNG at the end of it all - the script is accessed as an image through standard HTML <img src="script.php?...
by macbloke
Sun Feb 24, 2008 7:28 pm
Forum: Joombie Coding Q/A
Topic: Customising a component: call a username
Replies: 5
Views: 728

Re: Customising a component: call a username

If you're copying directly, you might want to use:

Code: Select all

$new_name = $username;
in lieu of your mosGetParam request.

StuG
by macbloke
Sun Feb 24, 2008 7:25 pm
Forum: Joombie Coding Q/A
Topic: Customising a component: call a username
Replies: 5
Views: 728

Re: Customising a component: call a username

You're missing a ';' from the end of one of the lines. Check you've got them all complete and you should be good to go.

Regards,

StuG
by macbloke
Sun Feb 24, 2008 2:40 pm
Forum: Joombie Coding Q/A
Topic: [SOLVED] J!1.5 - Preferences Button
Replies: 2
Views: 381

Re: J!1.5 - Preferences Button

Spot on thanks.

StuG
by macbloke
Sat Feb 23, 2008 10:37 pm
Forum: Joombie Coding Q/A
Topic: Customising a component: call a username
Replies: 5
Views: 728

Re: Customising a component: call a username

In J!1.0 you need to use:

Code: Select all

global $my;

$userid = $my->id;
$username = $my->username;

In J!1.5 you need to use:

Code: Select all

$user =& JFactory::getUser();

$userid = $user->get('id');
$username = $user->get('username');

Hope this helps.

StuG
by macbloke
Sat Feb 23, 2008 10:29 pm
Forum: Joombie Coding Q/A
Topic: J!1.5 - Help Button
Replies: 0
Views: 210

J!1.5 - Help Button

Hi,

In J!1.5 the code:

Code: Select all

JToolBarHelper::help( 'screen.banners' );
shows the Banner Component's help screen.

How can this be customised? Putting a URL in there just brings up a screen with 'Key Not Found' in there.

Cheers,

StuG
by macbloke
Sat Feb 23, 2008 10:23 pm
Forum: Joombie Coding Q/A
Topic: [SOLVED] J!1.5 - Preferences Button
Replies: 2
Views: 381

[SOLVED] J!1.5 - Preferences Button

Hi, I'm in the process of developing a component and need to include some preferences. To customise the Preference button, I am using the format: JToolBarHelper::preferences('com_componentname', , , , ); Is there a file or database table I need to enter the configuration details into? Where does tha...
by macbloke
Sat Feb 23, 2008 10:16 pm
Forum: Joombie Coding Q/A
Topic: Using mySQL
Replies: 2
Views: 455

Re: Using mySQL

What I want to do is select the id from the row in gj_category where its category is equal to 'mycat'. Then, I want to select the id 's from the gj_groups table where the categories are equal to 'gj_category.id' at 'mycat' Finally, I want to select the id s from the gj_users table where the user's ...
by macbloke
Sat Feb 23, 2008 10:06 pm
Forum: Joombie Coding Q/A
Topic: Strange View behaviour (J!1.5)
Replies: 1
Views: 273

Re: Strange View behaviour (J!1.5)

Seem to have found the source of this problem. Turns out that the model that the view was referring to didn't have a PHP terminator at the end of it. I had: <?php class ComponentModelView extends JModel { //Code in here } when I should have had: <?php class ComponentModelView extends JModel { //Code...
by macbloke
Sat Feb 23, 2008 9:13 am
Forum: Joombie Coding Q/A
Topic: [SOLVED] Pagination in J!1.5
Replies: 2
Views: 461

Re: Pagination in J!1.5

Bargain!

TVM,

StuG
by macbloke
Fri Feb 22, 2008 9:21 pm
Forum: Joombie Coding Q/A
Topic: [SOLVED] Pagination in J!1.5
Replies: 2
Views: 461

[SOLVED] Pagination in J!1.5

Hi, Using the MVC methodology, how do you get the pagination to work? I want to use JPagination as per: jimport('joomla.html.pagination'); $pageNav = new JPagination( $total, $limitstart, $limit ); And the query in the fashion: $db->setQuery( $query, $pageNav->limitstart, $pageNav->limit ); But if t...
by macbloke
Fri Feb 22, 2008 9:13 pm
Forum: Joombie Coding Q/A
Topic: Strange View behaviour (J!1.5)
Replies: 1
Views: 273

Strange View behaviour (J!1.5)

Hi, I'm coding up an admin component for managing graphs and tables within the J!1.5 environment. The component has 2 controllers - definitions and graphs. Each controller displays their data correctly, and if you go to edit a definition, you can and you can save everything fine. If you go to edit a...