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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 14,320
» Latest member: Johnrgk
» Forum threads: 69,946
» Forum posts: 359,890

Full Statistics

Latest Threads
load Controller in Contro...
Forum: CodeIgniter 3.x
1 minute ago
» Replies: 6   » Views: 9,564
Uncaught SyntaxError: Une...
Forum: Lounge
56 minutes ago
» Replies: 2   » Views: 30
How to Read a Large size ...
Forum: Lounge
2 hours ago
» Replies: 3   » Views: 41
how extends form validati...
Forum: General Help
3 hours ago
» Replies: 8   » Views: 202
Plupload error and answer
Forum: Libraries & Helpers
4 hours ago
» Replies: 0   » Views: 26
Pass values to external c...
Forum: CodeIgniter 4 Support
4 hours ago
» Replies: 2   » Views: 95
Error 404 when trying to ...
Forum: Installation & Setup
5 hours ago
» Replies: 7   » Views: 177
Search With Pagination ?
Forum: CodeIgniter 4 Support
6 hours ago
» Replies: 1   » Views: 51
PHP Scrit in C.I Method -...
Forum: General Help
7 hours ago
» Replies: 1   » Views: 71
Multi-Vendor Marketplace ...
Forum: Spotlight
8 hours ago
» Replies: 8   » Views: 7,811

 
  How to create counter for website?
Posted by: El Forum - 06-25-2007, 07:51 PM - Forum: Archived Development & Programming - Replies (3)

[eluser]java[/eluser]
I want to put the counter in my web page such as:
Number of visitor online
Number of accessing
Number of accessing a day
How to do that?
Thanks for any response. :-)


  image manipulation
Posted by: El Forum - 06-25-2007, 07:28 PM - Forum: Archived Development & Programming - Replies (13)

[eluser]ikim[/eluser]
Hello,

Im making an application where you upload a picture and then the app creates a thumbnail.

However, I want the thumbnail to come out as 85px by 85px.

The resize currently shrinks to longest side to 85px but then Im left with something like 85 by 100.

I know I must resize and then maybe crop the image but what is the best way of doing this?

Thanks


  firefox opens 'save to/open with' dialog when viewing php files
Posted by: El Forum - 06-25-2007, 06:32 PM - Forum: Archived Development & Programming - Replies (4)

[eluser]jvittetoe[/eluser]
how do i fix this? my site opens fine in ie7. this is a localhost connection. i just reinstalled my apache server and set up the config correctly.


  I Just Gotta Say...
Posted by: El Forum - 06-25-2007, 05:54 PM - Forum: Archived General Discussion - Replies (6)

[eluser]Developer13[/eluser]
I just gotta say that this community is plain AWESOME.

Every time I get stuck with something, if I can't find the answer in the userguide or wiki, it's sure to be found here.

The regulars here are also so patient ... sometimes as I'm reading through the threads (which I do a ton, but I rarely post) I really applaud the patience of the regulars who kindly remind newcomers to read through the user guide and / or wiki and / or forums when they post a question that has been clearly documented... which they then respond that they did... at which point I highly doubt they did, or I doubt their readiness for OOP / MVC / frameworks...

CodeIgniter is the first framework that I've stuck with and learned. Up to that point, I was just using my own libraries that would have looked like the remnants of a rusty old car sitting in a junkyard if it were a car... I knew that I needed to mature into a framework of some sort. CodeIgniter's minimalistic yet powerful and extremely flexible approach really drew me in. It's all been smooth sailing ever since!

Anyhow, to all the people that have answered my questions time after time without ever knowing it -- THANKS A TON!!! You're appreciated much more than you know.

Long live CodeIgniter!


  Active Records
Posted by: El Forum - 06-25-2007, 02:39 PM - Forum: Archived General Discussion - Replies (16)

[eluser]Peter Goodman[/eluser]
So, I'm a PHP developer and I've been working on my own PHP5 framework. For work though, I work with the CodeIgniter framework. I've found that the current "active records" system is inadequate. So, I've essentially translated code from my framework to work with CI. I'm about to start testing it out, but if anyone is interested, I will be releasing it (if I get it to work) as an extension/library/thingy.

Here's how it works (from within a controller)

Code:
// simple updating
$post = $this->getFinder('model_name')->find(1); // find something by its primary key
$post->name = 'hello';
$post->body = 'mooo';
$post->save();

// simple inserting
$post = $this->getFinder('model_name')->createRecord();
...
$post->save();

// given a table relation specified by hasMany or hasOne in a model definition, other
// table rows can be accessed as:
$post->replies;
// where 'replies' is an automatically added table.

This only gives a small idea of the neat features I supply. If anyone is interested, please say so Smile


  small problem with form validation
Posted by: El Forum - 06-25-2007, 02:24 PM - Forum: Archived Development & Programming - Replies (1)

[eluser]johnman[/eluser]
when you have 2 fields which should match and you trim them both, they should only be compare After they are both trimmed. If you enter 'aaaaa ' into the first one and 'aaaaa ' into the second one, they should match after trimming, but this doesnt't happen.


  Little question about output
Posted by: El Forum - 06-25-2007, 01:59 PM - Forum: Archived Development & Programming - Replies (8)

[eluser]VivaUkraine[/eluser]
In my controller i've code for retriving news from database :

Code:
$content = $this->db->get('news');

and i view i've a code like this.
Code:
<?foreach ($content->result() as $row):?>        
            <div class="item">
                
                <h1>&lt;?=$row->title?&gt;</h1>
                <div class="descr">&lt;?=$row->date?&gt;</div>
                &lt;?=$row->content?&gt;
                </div>
        &lt;?php endforeach; ?&gt;

The problem is that i want to do some replacements in $row->content variable. For ex. i want to replace all '&lt;code&gt;' with '<code>' and all '&lt;/code&gt;' with '</code>' tags. I dont want to do this in view file.... How can i do it in Controller ?


  Email verf.
Posted by: El Forum - 06-25-2007, 10:28 AM - Forum: Archived Development & Programming - Replies (6)

[eluser]Lol![/eluser]
Hello!
I have the code:

Code:
&lt;?
echo form_open('cliente/cadastro');

echo form_hidden('id_cliente', $cliente['id_cliente']);

$page_redirect = isset($page_redirect) ? $page_redirect : 'login_ok';
echo form_hidden('redirect', $page_redirect);
?&gt;
<table align='center'>
  <tr>
    <td>* Nome:</td>
    <td>&lt;?=form_input('nome', $cliente['nome']);?&gt;</td>
  </tr>
  <tr>
    <td>Nascimento:</td>
    <td>&lt;?=form_input('nascimento',$cliente['nascimento']);?&gt;</td>
  </tr>
  <tr>
    <td>Endereço:</td>
    <td>&lt;?=form_input('endereco', $cliente['endereco']);?&gt;</td>
  </tr>
  <tr>
    <td>Complemento:</td>
    <td>&lt;?=form_input('complemento',$cliente['complemento']);?&gt;</td>
  </tr>
  <tr>
    <td>Bairro:</td>
    <td>&lt;?=form_input('bairro', $cliente['bairro']);?&gt;</td>
  </tr>
  <tr>
    <td>CEP:</td>
    <td>&lt;?=form_input('cep', $cliente['cep']);?&gt;</td>
  </tr>
  <tr>
    <td>Cidade:</td>
    <td>&lt;?=form_input('cidade', $cliente['cidade']);?&gt;</td>
  </tr>
  <tr>
    <td>Estado:</td>
    <td>&lt;?=form_input('estado', $cliente['estado']);?&gt;</td>
  </tr>
  <tr>
    <td>* DDD:</td>
    <td>&lt;?=form_input('ddd_tel', $cliente['ddd_tel']);?&gt;</td>
  </tr>
  <tr>
    <td>* Telefone:</td><td>&lt;?=form_input('telefone', $cliente['telefone']);?&gt;</td>
  </tr>
  <tr>
    <td>DDD:</td>
    <td>&lt;?=form_input('ddd_cel', $cliente['ddd_cel']);?&gt;</td>
  </tr>
  <tr>
    <td>Celular:</td>
    <td>&lt;?=form_input('celular', $cliente['celular']);?&gt;</td>
  </tr>
  <tr>
    <td>* Email:</td>
    <td>&lt;?=form_input('email', $cliente['email']);?&gt;</td>
  </tr>
  <tr>
    <td>CPF/CNPJ:</td>
    <td>&lt;?=form_input('cpf_cnpj', $cliente['cpf_cnpj']);?&gt;</td>
  </tr>
  <tr>
    <td>RG/Insc.Est.:</td>
    <td>&lt;?=form_input('rg_inscest', $cliente['rg_inscest']);?&gt;</td>
  </tr>
  <tr>
    <td>* Senha:</td>
    <td>&lt;?=form_password('senha', $cliente['senha']);?&gt;</td>
  </tr>
  <tr>
    <td align='center'>&lt;?=form_submit('', 'Salvar');?&gt;</td><td>Os campos com * são obrigatórios</td>
  </tr>
</table>

&lt;?
echo form_close()
?&gt;

How I call an email verification at the "* Email" form?


See ya!


  Character Encoding
Posted by: El Forum - 06-25-2007, 09:20 AM - Forum: Archived Development & Programming - No Replies

[eluser]pmonty[/eluser]
I am not sure if this is a PHP question or a CI question.

I am building an app that has MSSQL as the backend. I am pulling a uniqueid field from a table to use as a value in a cookie

The value in my table is this:

Quote:D38A0490-4F74-4B72-A954-D13E29F1C27F

The value displayed in the page I am using to test the value is this (with UTF-8 encoding):

Quote:ŠÓtOrK©TÑ>)ñÂ

The value in the cookie as passed to the browser with the helper function set_cookie() is:

Quote:&#x90;&#x04;&#x8A;&#xD3;tOrK&#xA9;T&#xD1;&#x3E;&#x29;&#xF1;&#xC2;&#x7F;

I would like to be able to test the cookie on subsequent page loads for permissions and so forth. Apart from using session id's is there something in CI that I can use to make the table value show in my page and "Set" in my cookie consistent with the value displayed in my backend or is this a browser issue that I will need to play with?

Paul

Addendum: I believe the encoding is happening within the PHP query process. Retrieving the value and then re-querying the table using the uniqueid as PHP presents it gives me a database error "converting character string to uniqueidentifier." I am going to look for some info on this but if anyone has firsthand knowledge of the issue and can point me to a work around, I would be appreciative.

Addendum 2: Work around is using this in the SELECT statement CAST(myuniqueidentifier_field as VARCHAR(36)) as CGUID. This gives me all the right cookie, html encoding and all the other stuff and works in subsequent queries using the value as the search parameter.


  Use one model within another
Posted by: El Forum - 06-25-2007, 09:13 AM - Forum: Archived General Discussion - Replies (7)

[eluser]Peter Ivanov[/eluser]
Hello is it possible to
use the functions from one model within a function in another model



  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.