Welcome Guest, Not a member yet? Register   Sign In
  can't undersatand where does the pop up come from
Posted by: El Forum - 11-06-2008, 11:37 AM - Replies (1)

[eluser]belbek[/eluser]
I have a simple page in a site built on CI. In that page a just have flv player using SWF-object.
While playing the flv long pop up appears on top of the page with advertising and link leading to some other site. There is nothing strange in the source code. Is this XSS. If it is how to treat it. This behaviour appears only in IE 6,7. $config['global_xss_filtering'] set to true in the congig file.
Thanks.


  suPHP & PATH_INFO to use $_GET
Posted by: El Forum - 11-06-2008, 11:05 AM - No Replies

[eluser]sikkle[/eluser]
Hi guys,

does anybody here successfully handle $_GET request from any $config['uri_protocol'] using suPHP on his production server ?


I doesnt seem to be able to use path_info or orig_path_info.

Someone got info about that ?

thanks !


  Repopulate select menus in 1.7
Posted by: El Forum - 11-06-2008, 10:56 AM - Replies (3)

[eluser]Sander Versluys[/eluser]
I've searched the forums and it's been asked before but since 1.7 the validation library has changed, I can't get it to work.

Code:
<select name="myselect">
  <option value="one" &lt;?php echo set_select('myselect', 'one', TRUE); ?&gt; >One</option>
  <option value="two" &lt;?php echo set_select('myselect', 'two'); ?&gt; >Two</option>
  <option value="three" &lt;?php echo set_select('myselect', 'three'); ?&gt; >Three</option>
</select>

This code is from the docs. I do not understand how the function can know which option to select. Can somebody explain this to me...?

Here's an example of what I'm trying todo:

Code:
<select name="level">
  <option value="0" &lt;?= set_select('level', '0'); ?&gt; >Gebruiker</option>
  <option value="1" &lt;?= set_select('level', '1'); ?&gt; >Partner</option>
  <option value="2" &lt;?= set_select('level', '2'); ?&gt; >Administrator</option>
</select>

In my controller I pass the object $user, wich has the property 'level', to the view. The option with the same level as in the object should be selected.

Any help would be greatly appreciated! Thanks!


  Route using database information
Posted by: El Forum - 11-06-2008, 10:49 AM - Replies (32)

[eluser]WanWizard[/eluser]
Hello from this Newbie.

I'm planning to rewrite our current web framework (which has been around since the PHP3 days, and in dire need of a makeover), and the plan is to use this fantastic framework as the foundation.

While writing down the new architecture and design (yes, I'm old ;-)), I have stumbled upon an issue that I don't quite know how to address.

Our current system uses a 'content-tree', which is basically the URI structure of the site, and is stored in a database. The system administrator can map any leaf of the tree (a specific URI) to a function, either static content, a core module (p.e. user administration) or a custom application (p.e. products).

This means in CI terms (if I understand it correctly) that I need to route based on database contents. From what I gather I can do that in:
- /config/routes.php, generate a custom $route['(.*)'] = for every URI requested
issue: no database functionality here, no URI functionality here
- /system/application/libraries/MY_Router.php, and rewrite the _validate_request() function
I do have URI functionality here, but still no database access
- /system/application/controller/dispatcher.php, and use a $route['(.*)'] = "dispatcher";
I have all CI functionality here, but basically I need to duplicate router and CI core code here to be able to load the correct controller that is the result of the content-tree lookup. Not best practice either.

Anyone any thoughts on how to approach this?


  Getting a loaded library instance: how?
Posted by: El Forum - 11-06-2008, 10:46 AM - Replies (4)

[eluser]Unknown[/eluser]
I want to load a library specified in a config file as a string. Since the name of the class can change, I do to not want to hardcode it.

Code:
$authclass = $this->config->item('authenticator');
$this->load->library($authclass);
I could refer to this library statically:
Code:
$this->authenticator->foo();
But. how can I refer to this library dynamically? Something like:
Code:
$this->$authclass->foo();
Alternatively, is there a way so that:
Code:
$auth = $this->load->library($authclass);
then you'd think either this would work:
Code:
$this->$auth->foo();
or this
Code:
$auth->foo();
Thanks.


  Documentation Correction : there is no "uri_segments()"
Posted by: El Forum - 11-06-2008, 09:27 AM - Replies (3)

[eluser]netricate[/eluser]
http://ellislab.com/codeigniter/user-gui...elper.html

uri_segments() should be uri_string(). uri_segments() does not exist.


  Not just another template system (with screencast)
Posted by: El Forum - 11-06-2008, 09:21 AM - Replies (17)

[eluser]philpalmieri[/eluser]
Not just another template system (with screencast)

So we have been working on this template system that we are now sharing. We built it to separate not only the design from the application, but the designers themselves. Follow with me for a minute: we use a cascading template that includes main outer templates, header, footer and content areas, along with css/js.

Basically, the template system uses the URL to decide which template to parse, based on the file system path.

URL: "site.com/foo/bar" will look in the template folder and use the document, content, header & footer.

Then it looks in foo, if foo containes a doc, head, footer, or content it will override the previous one and use it.

Each level can also include a css and js folder. This is useful so you can override styles based on the section of the site your in.

I know it sounds a bit hacky, but its actually really efficient.

Code:
/templates
  - document.php
  - content.php
  - header.php
  - footer.php
  - /css
  - /js
  - /store
  --- store.php
  --- /css
  --- /viewProduct
  ----- document.php
  ----- viewProduct.php


You can pass variables, set custom areas, and override the templates at any point too. so for some code:

We chose to call it "view" so that we don't confuse anybody internally who is used to working with views. Also, we still use CI views, but we use them as reusables for our modules. Those views then get passed into variables to use in the template.

Code:
//Load the lib
$this->load->library('view');

//Render Template
$this->view->render();

//Set Variables
$this->view->set("content", "variable", "value");
$this->view->set("content", $assocArray);
$this->view->set("header", "activePage", "products");
$this->view->set("content", "news_list", $this->load->view("news_list", $news, TRUE));

//Append Values
$this->view->append("document", "pageTitle", "Product XYZ");

//Override template
$this->view->override("content", "customTemplate.php");

//Render for AJAX
$this->view->render(TRUE); // will render just the content file without the outer templates

Future:
Pulling the JS/CSS minifying and even variable parsing/caching
We will pull it out of our SVN soon and stick it on google code or something, but for now i'll just keep posting the zip files as we upgrade.

8 Minute Screencast
http://vimeo.com/2170796

Download:
http://www.page12.com/ci/viewlib/ViewLib.zip

Default Demo templates
http://www.page12.com/ci/viewlib/templates.zip


  XSLT views
Posted by: El Forum - 11-06-2008, 08:06 AM - Replies (1)

[eluser]moesian[/eluser]
Hi,

Is anyone here using xslt to create their views?

Is client-side xslt creation of pages a viable option or is the xslt best peformed serverside? (I'm only really interested in a site working for current browsers and ie6)

The idea of being able to transform an xml document to create pages for specific devices using different xsl files sounds appealing, but are there issues I should be aware of? (Speed, extra processing)

Thanks


  Shortcut Key ctrl+u is not working in safari for tinyMce editor.
Posted by: El Forum - 11-06-2008, 06:38 AM - Replies (2)

[eluser]Unknown[/eluser]
Hi,
Is their any way to solve shortcut key ctrl + u is not working in safari for tinyMce editor.Any one know the way to solve this means mail me.


  Question on URI Query Strings
Posted by: El Forum - 11-06-2008, 06:29 AM - Replies (5)

[eluser]jamie young[/eluser]
If I understand correctly, by default CI has query strings disabled by default, preferring you to use something like http://domain.com/class/function/id. If I want to use something like http://domain.com/class?product=2 I would need to set enable_query_strings to TRUE in config.php and do something like http://domain.com/index.php/c=class&m=method&product=2.

I have noticed you can get around this if you have 2 query strings in your URL though.

Example. If I do http://domain.com/login?.done=http://google.com I get a 404, page not found, however if I do http://domain.com/login?.done=http://google.com&a the page displays properly and if I dump out $_REQUEST it will show _done and a.

Is this a feature I have not read about? or should that not be working w/out enable_query_strings set to TRUE?


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

Username
  

Password
  





Latest Threads
[4.5.1] Disabling the deb...
by keto
1 hour ago
Showing pdf on browser
by kenjis
1 hour ago
directory structure
by badger
1 hour ago
Redirect with error vali...
by pippuccio76
2 hours ago
Pass custom variables to ...
by InsiteFX
4 hours ago
problem with textarea
by InsiteFX
4 hours ago
How to run a single seede...
by kenjis
10 hours ago
Codeigniter 4 extend core...
by kenjis
10 hours ago
blocked by CORS policy
by kenjis
10 hours ago
[CodeIgniter 4 on IIS 10]...
by Bosborne
Yesterday, 12:33 PM

Forum Statistics
» Members: 84,263
» Latest member: medicinederma
» Forum threads: 77,553
» Forum posts: 375,873

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB