Welcome Guest, Not a member yet? Register   Sign In
  Call function from another function
Posted by: El Forum - 04-01-2008, 07:33 AM - Replies (4)

[eluser]luukskywalker[/eluser]
I have a small question.

I have 2 functions in 1 controller
Say Function A and Function B

Is it possible to call function B at the end of Function A?
If so, how is this done?

I know i can call a view but i don't want a view at the end of function A


  validation problem in server system
Posted by: El Forum - 04-01-2008, 07:18 AM - Replies (2)

[eluser]MASS MASS[/eluser]
I am getting validation problem in server system........ in localhost its working fine .....
Example : login page

in controller i wrote
function login()

{

$rules['email'] = "trim|required|xss_clean";
$rules['password'] = "trim|required|xss_clean";
$this->validation->set_rules($rules);

$fields['email'] = 'E-mail';
$fields['password'] = 'Password';
$this->validation->set_fields($fields);

if ($this->validation->run() == FALSE)
{

$this->load->view('users/login',$arr_data);

}

else
{
echo sucess......;

}

}

from above function its always going to if condition ..... but its working fine in localsystem........

Please help........ its urgent


  image lib confuses me
Posted by: El Forum - 04-01-2008, 06:42 AM - No Replies

[eluser]richthegeek[/eluser]
Does anyone else find the image library confusing?

Why can't we just have stuff like this:

Code:
$this->load->libary("image");

...

$this->image('image.png')->rotate( "+45" )->saveTo( "assets/images/rotated/_SRC_" );

...
$img = $this->image('image.png');

$img->crop( fromX, toX, fromY, toY );
$img->resize( width, height, retainAspect ); // alternatively, if width=false or height=false, retain aspect automatically.

$img->output();

The current use of config etc is less useful to me than the imageGD stuff...


  Regular Expression
Posted by: El Forum - 04-01-2008, 04:22 AM - Replies (3)

[eluser]nirbhab[/eluser]

Quote:&lt;object width="425" height="355"&gt;<param name="movie" value="http://www.youtube.com/v/SZPz8gaFaEE&hl=en"></param><param name="wmode" value="transparent"></param>&lt;embed src="http://www.youtube.com/v/SZPz8gaFaEE&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;

Guys how to find the bold string from the above string

Hope you have got my idea.
I want add the youtube videos in my site, added as user videos..some what like orkut does.
I am going to extract the source of flash file, and save in DB_table with user_id(logged in user).

If my plan is wrong please suggest a better way.


  Finding an item's position in an array, and then returning previous and next items
Posted by: El Forum - 04-01-2008, 04:07 AM - Replies (2)

[eluser]Daniel H[/eluser]
Guys,

I wonder if anyone can explain how I can do this presumably straight forward thing.

Consider an array like this, e.g.

Code:
Array
(
    [0] => Array
        (
            [WorkExampleID] => 27947
            [Filename] => d9645d79046ca841a2b87e264b26b2fd.jpg
        )

    [1] => Array
        (
            [WorkExampleID] => 27946
            [Filename] => b9b8afc7a0814f890c5d66c1cd9ba591.gif
        )

    [2] => Array
        (
            [WorkExampleID] => 27945
            [Filename] => c3d8a8e538fb9d5de07c2353e2809b71.jpg
        )

    [3] => Array
        (
            [WorkExampleID] => 27944
            [Filename] => acebd1c4c45664048c7094e2267185aa.jpg
        )


On a page, I'm displaying work example whose ID is 27946, i.e. key[1]. How then would I firstly locate this value in the array, and then return ID 27945 (next) and ID 27947 (previous)?

Many thanks,

Dan.


  mysqli update record returns error
Posted by: El Forum - 04-01-2008, 03:24 AM - Replies (6)

[eluser]Atasa[/eluser]
Anyone had this before?
What I do is

Code:
$where = $idColumn . " = " . $idValue;
$str = $this->db->update_string($tableName, $data, $where);
if ($this->db->query($str) === TRUE)
return $idValue;

Returns:

Quote:An Error Was Encountered
Error Number: 0
UPDATE news_categories SET PARENT_CATEGORY_ID = '-1', CATEGORY_TITLE = 'TEST2' WHERE CATEGORY_ID = 1

to my surprising eyes The Update happens but I couldn't figure out from where this error is coming from.

I use mysqli driver and this error it is driving me nuts!


  CodeIgniter 2.0 to be charged for
Posted by: El Forum - 04-01-2008, 02:28 AM - Replies (22)

[eluser]adamp1[/eluser]
I was just on a twitter service and heard the following from Derek,

Quote:As soon as CodeIgniter 2.0 is released, yes it will be charged for, just like ExpressionEngine. The reason for this change in policy is due to the cost it takes to maintain the code. Rick feels all the developers who did use it will not mind paying a small fee for the privilege. No offical amount has been set out, but I think he wants to go for a monthly fee probably in the range of $50/pm to cover his expenses.

Well I don't know about others but if this news is true, then I shall no longer be using CodeIgniter.


  New codex site design :)
Posted by: El Forum - 03-31-2008, 09:10 PM - Replies (3)

[eluser]Majd Taby[/eluser]
Heh I was feeling designy and especially geeky...this is what I came up with


  Issue with HTML generated from CI Email class
Posted by: El Forum - 03-31-2008, 08:55 PM - Replies (10)

[eluser]captainbeef[/eluser]
Hello,
I just used the native CI Email class for the first time.

I have configured it to use html by default.

The sent email seems to display ok in Thunderbird, but gets a bit yucky in gmail.
The html source seems to have an equals sign at the end of each line, as follows:

Code:
&lt;head&gt;&lt;link href=3D"http://rtwnews.org/CSS/grey.css" rel=3D"stylesheet" typ=
e=3D"text/css" /&gt;&lt;title&gt;RTW News Bulletin&lt;/title&gt;&lt;/head&gt;&lt;body&gt;<div class=3D=
"bulletinPreview"><table><tr><td class=3D"StoryTitle">RTW News Bulletin</td=
></tr></table><br /><br /><br /><br /><table><tr><td class=3D"FormLabel"><s=
pan style=3D"font-weight: bold;">This edition of the newsletter contains </=
span><span style=3D"font-weight: bold;">bolded </span><span style=3D"font-w=
eight: bold;">intro text. <br><br></span>Lorem ipsum dolor sit amet, consec=
tetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet =
dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nost=
rud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commo=
do consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate vel=
it esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at =

Can anyone please tell me if this normal?

thanks


  Registration activation through email verification ation ation
Posted by: El Forum - 03-31-2008, 04:45 PM - Replies (5)

[eluser]jbads[/eluser]
Hi, Im sure some of you have dealt with activating a users registration by some kind of email verification system, where a user signs up and to make sure they give you a valid email address you auto send some kind of way for them to complete their registration.

Im trying to think of the most efficient way this can be achieved and thought i'd try get some ideas from the rest of you, and any resources you could point me to, to help keep me from going bald trying to impliment such a system.

Thanks heaps, Jake


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Validation error messages...
by kabeza
42 minutes ago
CodeIgniter4 - How i can ...
by sarath_unrelax
3 hours ago
How to Find & Hire Codeig...
by Bosborne
5 hours ago
Insert in joint table bef...
by kcs
6 hours ago
I built 30 startups in 20...
by InsiteFX
9 hours ago
6 hard truths about learn...
by InsiteFX
9 hours ago
4.4.1 to 4.4.8 base_url p...
by kenjis
Yesterday, 04:02 PM
CI NEEDS A PROPER DOCUMEN...
by ALTITUDE_DEV
Yesterday, 06:45 AM
Optimize.php make a probl...
by ALTITUDE_DEV
Yesterday, 06:35 AM
CodeIgniter v4.5.0 Releas...
by LP_bnss
Yesterday, 05:16 AM

Forum Statistics
» Members: 87,103
» Latest member: bj88ceohuynhbaoviet
» Forum threads: 77,631
» Forum posts: 376,295

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB