Welcome Guest, Not a member yet? Register   Sign In
  Redux Auth and DB Session
Posted by: El Forum - 08-17-2008, 12:48 PM - Replies (5)

[eluser]lenwood[/eluser]
Hi All,
I plan to use Redux auth for my app. The installation instructions mention that using a database session library will increase security. I'm using CI 1.6.3, so would I use DB2 Session for this?

Thanks,
Chris


  Question About Data Structure and URLs
Posted by: El Forum - 08-17-2008, 12:02 PM - Replies (1)

[eluser]lenwood[/eluser]
Hi All,
I'm grappling with how the data for my application is going to be structured, accessed, displayed, etc. My question comes from the URI routing info. The way CI works natively, I'd have a class named "productGroup" and then functions named "product1", etc, correct?

If I use the methods described in the URI routing document, would I be coding up classes and methods for each category of products, or can that all be created from data in the database?

Example, suppose I have shoes and boots with several choices for each. Is it possible to code up classes and methods to pull the category and product from the database? If so then adding sandals later would be pretty simple.

If this has been addressed somewhere else links are fine.

Thanks,
Chris


  Active Record - Update - Alias and joined Tables
Posted by: El Forum - 08-17-2008, 11:06 AM - Replies (3)

[eluser]The Wizard[/eluser]
Hello friendsSmile

ive a quick question. i use this query to copy a row from a table, to another.

the query is:

Code:
UPDATE
    c88v2_user_settings as toSettings,
    c88v2_user_status as fromSettings
SET
    toSettings.settings_staff = fromSettings.rights_staff
WHERE
    ( toSettings.id = 8000 )
    AND
    ( fromSettings.id = 4 )

how could i do exactly this, in active query.


  Working with a Template & Rewriting CSS & JS
Posted by: El Forum - 08-17-2008, 11:00 AM - Replies (3)

[eluser]ChangedNames[/eluser]
Hello CI community. I came across this framework yesterday and man does it look promising. I'm very excited about working with it.

My workflow in the past has led me to a filesystem structure that I prefer to use all the time now. I use it on small static projects, Wordpress themes, drupal, etc. It's pretty common amongst developers anyways so I don't want to claim any ownership over it. The purpose for writing is because I wanted to find a way to set it up with CI. I searched around the forums and couldn't find anything where someone did this already so I figured I would share.

I created my "template sections" (header, footer, ads, sidebar, etc) in my application/views folder under a subfolder "template". Each time I call them into place I (obviously) use $this->load->view('template/header'); or something to that affect. I always have my CSS and JS referring from the root of my domains. Example:

Code:
link rel="stylesheet" href="/css/main.css" type="text/css" media="screen" charset="utf-8"/>
I wanted to keep this intact but have the files nested within my template folder (so that if I need to change the "theme" down the road I can do this with ease. I also have a PHP file that actually works with my CSS and JS (for logging purposes - watching how many people access them directly). This lead me to add the following to my .htaccess file:
Code:
RewriteRule ^(.*)$ index.php?/$1 [QSA]
  RewriteRule ^css/(.*)\.css /system/application/views/template/file_handler.php?file=$1&type=css
  RewriteRule ^js/(.*)\.css /system/application/views/template/file_handler.php?file=$1&type=js  [L]
Now I don't have to worry about needing the URL helper to grab the root site address or anything.

Does anyone have any thoughts on this process? Does it seem illogical or flawed? I'm not too familiar with Apache or regular expressions so any thoughts are appreciated.
Smile


  Find double file names in helper directory?
Posted by: El Forum - 08-17-2008, 09:35 AM - Replies (4)

[eluser]Nummero2[/eluser]
Hi again,

is it possible to search the helpers directory for doubled entries? (like you have 10 helpers and two have accidentally the same name)

Greetings Sebastian


  How to handle request method post fields
Posted by: El Forum - 08-17-2008, 08:22 AM - Replies (3)

[eluser]Xavier D.[/eluser]
Hi,

I have an issue with a login system.

The login form is available on every page (menu dropdown).

I have a controller "user" with a function "login" to handle the post vars.

The problem is that I need to submit the form to user/login, the login function handles everything and does a redirect to the previous page, looks lide 2 redirections.

1) page -> /user/login 2) /user/login -> previous page

It is working, no problem, but I have a flash with the redirect, not very nice I think.

Is there a solution? So we can handle the post vars, not in the view offcourse. But on another way, whitout the refresh?

thx!


  Advice on making delete_files less dangerous?
Posted by: El Forum - 08-17-2008, 07:42 AM - No Replies

[eluser]Dave Stewart[/eluser]
Delete files is really useful, but I am scared that at some point I may accidentally pass something I shouldn't, or maybe with a leading slash and it will be a disaster.

I was thinking about updating the code to fail if a leading slash is encountered.
Any other ideas?

Thanks,
Dave


  [SOLVED!!] Grey out background while processing forms? (jQuery + blockUI)
Posted by: El Forum - 08-17-2008, 06:26 AM - Replies (4)

[eluser]fancms[/eluser]
I found this really neat little jQuery script that will basically block out an element or a whole page. http://malsup.com/jquery/block/

I'm interested in being able to implement this into my project, so when a user clicks submit the background is greyed out and they are presented with a "Message...please wait", while the form is processed.

However, I'm having a lot of trouble figuring out how to do this with CI. Most of my forms are set up with

Code:
if($this->validation->run() == FALSE) {
//Form/error stuff
} else {
//Process data
}

I can get the background to grey out but the page just comes back with no validation/processing being done. The link I posted shows a page that lets you do ajax calls to process stuff; however I'm completely lost when it comes to using AJAX with CI.

If anyone could give me a few pointers I'd be really grateful. Smile Thanks


  Multiple recordsets?
Posted by: El Forum - 08-17-2008, 06:18 AM - No Replies

[eluser]gRoberts[/eluser]
Hi all,

Does CI support multiple recordsets per query?

Cheers

Gav


  Cleaning up a database word for URL
Posted by: El Forum - 08-17-2008, 05:48 AM - Replies (2)

[eluser]Shinzo[/eluser]
Hi Guys!

I have a little question. I develop a community with mysql-databases. There I have an table with a field, which I use later as ID in my URLs.

i.e.: http://www.domain.de/page/show/my_word/

query is then: select * where clearword = my_word

I use this for clean urls.

So now i always have an simple function to clean up my word and destroy special characters and so on:

Code:
function name($alias) {
      $1 = Array("/ä/","/ö/","/ü/","/Ä/","/Ö/","/Ü/","/ß/");
      $2 = Array("ae","oe","ue","Ae","Oe","Ue","ss");
      
      $alias = preg_replace($1, $2, $alias);          
      $alias = strip_tags($alias);
      $alias = preg_replace('/&.+?;/', '', $alias);
      $alias = preg_replace('/[^\A-Za-z0-9 _-]/', '', $alias);
      $alias = preg_replace('/\s+/', '-', $alias);
      $alias = preg_replace('|-+|', '-', $alias);
      $alias = strtolower($alias);
      $alias = trim($alias, '-');
      
      return $alias;
}

I use CI not long and I wanted to ask if there is an Helper or a library which is doing the same thing. Maybe you have program an own function which you use with CI.


(Sorry for my bad english Wink )

Thanks for answers,
Shinzo


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

Username
  

Password
  





Latest Threads
Modify users data as an a...
by padam
3 hours ago
Asset Minification Packag...
by tarcisiodev1
3 hours ago
Is it possible to go back...
by ejimenezo
5 hours ago
Error / Shield 1.0.3 + Ci...
by kcs
9 hours ago
SQL server connection not...
by davis.lasis
9 hours ago
Validation | trim causes ...
by Gary
11 hours ago
Problem with session hand...
by Julesb
Today, 04:13 AM
External script access to...
by PomaryLinea
Today, 03:58 AM
VIRUS reported after Chro...
by InsiteFX
Yesterday, 11:34 PM
Codeigniter4 version 4.5....
by kenjis
Yesterday, 04:10 PM

Forum Statistics
» Members: 85,494
» Latest member: daimonezeca7
» Forum threads: 77,585
» Forum posts: 376,020

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB