Welcome Guest, Not a member yet? Register   Sign In
  export web page to pdf on the fly
Posted by: El Forum - 08-02-2008, 08:07 AM - Replies (2)

[eluser]paulcj2[/eluser]
I'd like my site visitors to be able to print the contents of my web pages reformatted on the fly as one page printed flyers. Here's an example on my existing procedurally coded website (soon to be converted to CI).

The web page (workshop information) is here
At the bottom of the page is a link (print flyer) to a page in which this information is converted to a flyer format.

The the page reformatted as a flyer is here

Problem is that visitors will print this page using various platforms, OSs, browsers & printers.

Is there some CI helper or other functionality that can help smooth out the kinks that all these variables cause, so that visitors can get consistently good flyer hard copy?


  wired problem when insert data
Posted by: El Forum - 08-02-2008, 06:26 AM - Replies (3)

[eluser]Unknown[/eluser]
function addThing($thing)
{
foreach( $thing as $key => $value )
{
$this->db->set( $key, addslashes($value) );

}
$this->db->insert('things');


$id = $this->db->insert_id();
if(empty($id))
{
log_message('error', "addThing:" . $this->db->last_query());
}
return $id;

}
Sometimes the insert_id is 0, and no data is inerted into database, but when I execute the logged sql, it can be executed successfully. Does anybody have the save problem or have any ideas about it?
Thanks in advance!


  Need help to get file size while uploading
Posted by: El Forum - 08-02-2008, 06:01 AM - Replies (2)

[eluser]nandish[/eluser]
I try to avoid uploading images according to file size but the thing is am not able to get file size with the help of javascript



function getFilesize(){
var size = document.images['uimgs'].fileSize;
return size;
}
function validate(){
alert(getFilesize()Wink;
}
If i run this script its return undefined in both IE AND FIREFOX


Thanks in Advance


  How i can add emailtype on sending mail to in mail() in codeigintor
Posted by: El Forum - 08-02-2008, 05:26 AM - Replies (1)

[eluser]Shahgeb[/eluser]
Hi EveryBoldy
I need information how i can add emailtype while i am using codeignitor. Can any Body help me


  404 Page Not Found --> none
Posted by: El Forum - 08-02-2008, 01:19 AM - Replies (4)

[eluser]bikuta[/eluser]
Everything seems to work but when I check the error logs I get a whole heap of messages that says:

ERROR - 2008-07-30 09:21:53 --> 404 Page Not Found --> none
ERROR - 2008-07-30 09:21:53 --> 404 Page Not Found --> none

Any ideas why these errors keep popping up?


  Accessing a Property Created in Another Library
Posted by: El Forum - 08-01-2008, 11:52 PM - Replies (2)

[eluser]Aea[/eluser]
I have a library that I want to access session data without explicitly passing it in, I'm using a custom session class (although this shouldn't really play in much), I'm having the following issue..

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Pages::$session

Filename: libraries/Themer.php

Line Number: 21

Pages is the controller I'm running this from.


My Hooks File (I explicitly run sess_run), session doesn't auto-load and this part "works"

Code:
$hook['post_controller_constructor'][] = array(
                                    'class'    => 'Session',
                                    'function' => 'sess_run',
                                    'filename' => 'Session.php',
                                    'filepath' => 'libraries'
                                    );

Library Code
Code:
12 class Session {
13
14    /*
15    |--------------------------------------------------------------------------
16    | Constructor
17    |--------------------------------------------------------------------------
18    */
19    function __construct()
20    {    
21        $this->CI =& get_instance();
22        log_message('debug', 'AE_MemSession Class Initialized');
23                
23        $this->CI->load->model('aes', 'aes');
24                
25        if($this->CI->config->item('sess_match_useragent'))
26        {
27            //
29        }
30        else
31        {
32            //
33        }
34    }
35    
36    public function test()
37    {
38        echo 'WEE';
39    }

Other Library Trying to Access Property...
Code:
19    public function generate_header()
20    {
21        $this->CI->session->test(); // PROBLEM HERE
22    }

What am I missing? And, what would be the most efficient OO-Correct way to do this (previously I was using $_SESSION which had the benefit of being available everywhere.)


  Test for database connection success
Posted by: El Forum - 08-01-2008, 08:57 PM - Replies (7)

[eluser]Aquillyne[/eluser]
I want to connect to my database with $this->load->database(), but I want to be able to control what happens if it fails (rather than it throwing up an error).

A try/catch block doesn't seem to work. The problem appears to be that CI has custom error handling here.


  Database driven page
Posted by: El Forum - 08-01-2008, 07:04 PM - Replies (2)

[eluser]molivetti[/eluser]
Hello everyone, i'm a noob of ci and i am trying to make the database able to create a page. In details i have this page, where i want to show our work (like portfolio/ID), but i don't know how to do this part. I have already set up the db and the portfolio tables, and also read several tutorial but i just can't understand them (i'm not a programmer Tongue)


  Dividing up public and private access between controllers
Posted by: El Forum - 08-01-2008, 06:09 PM - No Replies

[eluser]-sek[/eluser]
I have a question, but first some background.

I have a controller enabling users to browse a list of their friends in their social network. They can remove or approve friends in this list. A user must have valid credentials to login in order to see this page.

A different controller is responsible for the the display of the user profile to the public. This page displays a list of friends. Since this list can grow fairly long, I want to create a separate page listing all friends. The profile will display a limited number of friends and a link to the page showing all friends. This is pretty common.

Now, the question.

The code for displaying "more friends" can go either in the Friends controller or the Profile controller. The functions implemented by the friends controller at this time are all accessible only to logged in users. If I chose this solution, I will be mixing private and public functions in the same controller, although each with different access requirements (logged in user and public). The feature will reside at (friends/more/username.html) along with the private management function (at friends/browse.html).

If I chose the Profile controller (at profile/friends/username.html or profile/morefriends/username.html), two public functions will reside in a controller with only public function (at this time).

I suppose this breaks down into two questions: what is the best location the feature should appear at (I know an alias can be setup) and whether it is a good idea to mix controllers with public and private purposes. It seems that if I do the proper authentication for each function, that it would be okay to mix various access levels in the same controller. I'd like to have your opinion on the issue.


  passing a lot of data via uri segments
Posted by: El Forum - 08-01-2008, 04:08 PM - Replies (4)

[eluser]spherop[/eluser]
newbie to ci and still learning the ropes ...

i have some jquery/javascript code that will insert data in the db by ajax request.

in the form data are many fields including [artistname, genre, url, description] etc.

is the standard uri segment approach used in a case like this typically?

in this case the user will not see the url as it will be ajax, but i am wondering what people do when they don't want a huge ugly url from a lot of data being passed in?

what kind of encoding decoding needs to be done to prevent (using a url as example) "/"'s or other characters from messing up the uri segments?

love some guidance or pointers ...


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

Username
  

Password
  





Latest Threads
Display a custom error if...
by b126
1 hour ago
Type error in SYSTEMPATH\...
by DXArc
1 hour ago
v4.5.1 Bug Fix Released
by LP_bnss
2 hours ago
Retaining search variable...
by Bosborne
4 hours ago
Getting supportedLocales ...
by InsiteFX
7 hours ago
composer didn't update to...
by Sarog
Yesterday, 03:56 PM
Pipe on url modified in %
by kenjis
Yesterday, 02:52 PM
Best way to create micros...
by kenjis
Yesterday, 02:50 PM
How to use Codeigniter wi...
by kenjis
Yesterday, 02:39 PM
extend url_to helper
by kenjis
Yesterday, 02:33 PM

Forum Statistics
» Members: 85,049
» Latest member: win55nhacai
» Forum threads: 77,571
» Forum posts: 375,951

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB