Welcome Guest, Not a member yet? Register   Sign In
  How to create counter for website?
Posted by: El Forum - 06-25-2007, 07:51 PM - No Replies

[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 - No Replies

[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 - No Replies

[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 - No Replies

[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 - No Replies

[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 - No Replies

[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 - No Replies

[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 - No Replies

[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 - 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 - No Replies

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


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

Username
  

Password
  





Latest Threads
Running Codeigniter Queue
by warcooft
2 hours ago
CLI Error
by ltarrant
2 hours ago
Get folder path instead o...
by pippuccio76
6 hours ago
Codeignighter not resondi...
by mikehoague
6 hours ago
Where can I find a reliab...
by InsiteFX
11 hours ago
Myth Auth register a new ...
by InsiteFX
Yesterday, 10:15 PM
Does CodeIgniter Shield H...
by tarcisiodev1
Yesterday, 08:33 PM
Caching Question
by ozornick
Yesterday, 08:26 AM
Codeigniter and ReactJS
by murugappan
Yesterday, 01:18 AM
C4 Latest version shield ...
by kenjis
05-18-2024, 04:41 PM

Forum Statistics
» Members: 88,283
» Latest member: fb68vin
» Forum threads: 77,670
» Forum posts: 376,483

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB