Welcome Guest, Not a member yet? Register   Sign In
  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:
<head><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


  CodeExtinguisher Release Candidate 11
Posted by: El Forum - 03-31-2008, 04:38 PM - Replies (193)

[eluser]Majd Taby[/eluser]
This thread is old. Please go to this thread



Release Candidate 11 has been released. The preview CodeExtinguisher post got too big, So i've started a new one.

Download: RC 11.2 - 203 KB of Gloriousness


To Install:
1- Drag the contents of the codex2_rc11 directory into your CI root (alongside index.php)
2- Access backend.php in your browser
3- Follow instructions


New Features:
- Simplified YAML file requirements
- New layout
- Updated ManyToMany and OneToMany interfaces
- Fixed known bugs
- Added search capability
- Simplified Installation and setup process.


Introductory tutorial: .mov Screencast

The public preview (login with preview:preview) has been updated.


  Domain routing possibilities in CI?
Posted by: El Forum - 03-31-2008, 03:33 PM - Replies (26)

[eluser]stevefink[/eluser]
Hi all,

Super quick question.

I have a few URLs that look like the following:

http://www.example.com/users
http://www.example.com/admin
http://www.example.com/partners

I understand how URI routing works on CI's internal engine in routes.php in order to be able to manipulate matters, however -- is it possible to use mod_rewrite + CI routing to have users point to say:

http://users.example.com

admin to http://admin.example.com .. etc? All under one CI install?

if I just setup my mod_rewrite rules properly will it know which controller is responsible for handling the mapping?

Thanks!


  newbie active record question: show me the SQL!
Posted by: El Forum - 03-31-2008, 02:59 PM - Replies (2)

[eluser]andjules[/eluser]
I've implemented a search function, and built the query using a few of the active record commands. I'm getting results, but clearly not the right ones...
SO, I want to debug
BUT I can't find documentation on how to get CI to show me the final SQL used by active record!


  Credit Card Processing / Validation
Posted by: El Forum - 03-31-2008, 02:53 PM - Replies (2)

[eluser]PV-Patrick[/eluser]
I am wondering if anyone has some suggestions on the best way to go about credit card processing/validation on a form. Here is what I have thought about so far...

I want to be able to authorize the transaction before it's converted to a sale; so if the user inputs the wrong CC information, the form will be displayed with everything filled out still and they can make the correction.

Currently, I thought about putting a callback rule on it and setting a session variable to the transaction ID I get from an AUTH_ONLY. However, that causes problems if there is any false validation returns. It will show up on the users CC statement and temporarily take the funds from their account; essentially leaving 5 transactions if they submit the form 5 times with errors.

My next thought would be to just validate the form with the validation class and then validate the card after. (on the TRUE side of form validation) However, I am not really sure how to repopulate the form, etc if their CC is declined for any reason. Can anyone shed some light on this and give some input? Thank you!


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

Username
  

Password
  





Latest Threads
Validation | trim causes ...
by Gary
1 hour ago
Modify users data as an a...
by xsPurX
3 hours ago
Defining extra constants ...
by ramonpuig
7 hours ago
Error / Shield 1.0.3 + Ci...
by kcs
9 hours ago
Bug with sessions CI 4.5....
by ALTITUDE_DEV
10 hours ago
Integrating Bootstrap 5 i...
by Bosborne
Today, 03:20 AM
Asset Minification Packag...
by tarcisiodev1
Yesterday, 05:11 PM
Is it possible to go back...
by ejimenezo
Yesterday, 11:49 AM
SQL server connection not...
by davis.lasis
Yesterday, 07:11 AM
Problem with session hand...
by Julesb
Yesterday, 04:13 AM

Forum Statistics
» Members: 85,567
» Latest member: dadad
» Forum threads: 77,586
» Forum posts: 376,036

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB