Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th July 2010, 21:36
shoevring shoevring is offline
Member
 
Join Date: Feb 2010
Posts: 71
Thanks: 1
Thanked 2 Times in 2 Posts
Default Some questions

Hi, i got some questions about the code..

Iam just begin to write one Module to my company, and so far it works..

My question is: How do i create a link in the content?

I mean if i have "orders" in list and the customer trying to click on the order i want to send the customer to example: test/web/into.php

Normally i do this: <a href='link'>text</a> but how do i do it so the DESIGN contains in the window?

I have found out with buttons..

Thanks for great software!
Reply With Quote
Sponsored Links
  #2  
Old 14th July 2010, 13:03
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

The interface is ajax based, this maens you do not use any links to content files. Instaed you load these content into a specific regions of the page with javascript and ajax. If you look at the existing files, you can see how it works. Example:

<a href="#" onClick="loadContent('test/web/into.php');">Link</a>
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 19th July 2010, 14:19
shoevring shoevring is offline
Member
 
Join Date: Feb 2010
Posts: 71
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Allright, thanks alot - it works perfectly...

I have some issues about charset, i have saved my files as utf-8 but i get this error:

"
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/ispconfig/interface/web/neohost/userinfo.php:1) in /usr/local/ispconfig/interface/lib/config.inc.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/ispconfig/interface/web/neohost/userinfo.php:1) in /usr/local/ispconfig/interface/lib/config.inc.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/ispconfig/interface/web/neohost/userinfo.php:1) in /usr/local/ispconfig/interface/lib/config.inc.php on line 36

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/ispconfig/interface/web/neohost/userinfo.php:1) in /usr/local/ispconfig/interface/lib/app.inc.php on line 60
"

Can you help me with this?

Thanks
Reply With Quote
  #4  
Old 19th July 2010, 14:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Most likely there is a whitespace or empty line at the beginning of file /usr/local/ispconfig/interface/web/neohost/userinfo.php. The file has to start with:

<?php

without any whitespace or other lines before that line.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 19th July 2010, 15:19
shoevring shoevring is offline
Member
 
Join Date: Feb 2010
Posts: 71
Thanks: 1
Thanked 2 Times in 2 Posts
Default

<?php is the first line in the userinfo.php
Reply With Quote
  #6  
Old 20th July 2010, 09:30
dcy dcy is offline
Junior Member
 
Join Date: Jul 2010
Posts: 24
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by shoevring View Post
<?php is the first line in the userinfo.php
Check in another editor, since there's a few text editors that quite silently add a char or two at the start of the file. (If using Windows check with PSPad or Notepad++).

If that is not the case then there is a possibility that you're trying to add Headers, ie:

<?php
header('Location: http://www.example.com/');
?>

This will not work, since the headers have already been generated by the time your script is inserted into the interface

D.
Reply With Quote
  #7  
Old 21st July 2010, 08:57
shoevring shoevring is offline
Member
 
Join Date: Feb 2010
Posts: 71
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by dcy View Post
Check in another editor, since there's a few text editors that quite silently add a char or two at the start of the file. (If using Windows check with PSPad or Notepad++).

If that is not the case then there is a possibility that you're trying to add Headers, ie:

<?php
header('Location: http://www.example.com/');
?>

This will not work, since the headers have already been generated by the time your script is inserted into the interface

D.
I have tried in Notepad++ and there is nothing to see...

The first line is <?php

I have maked the file as UTF-8, its was after that the file doing this...

But if i choose another charset, my language with special signs() not viewing correctly...

Whats the next? I choose ANSI as filecharset and what?
Reply With Quote
  #8  
Old 21st July 2010, 09:04
dcy dcy is offline
Junior Member
 
Join Date: Jul 2010
Posts: 24
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by shoevring View Post
The first line is <?php

I have maked the file as UTF-8, its was after that the file doing this...

But if i choose another charset, my language with special signs() not viewing correctly...

Whats the next? I choose ANSI as filecharset and what?
Well, I would try to temporarily replace the .php with a very simple one (say a "hello world" style one) - just to check that I'm not doing anything the code that would cause the error you're seeing. If that temporary script should work okay - then that would mean I'm doing something in the "normal" .php that introduces these errors. (and for starters you can just comment out all the code (ie: from just after &lt;?php to just before ?&gt, to see that it is read and included correctly.

D.
Reply With Quote
  #9  
Old 21st July 2010, 09:14
shoevring shoevring is offline
Member
 
Join Date: Feb 2010
Posts: 71
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by dcy View Post
Well, I would try to temporarily replace the .php with a very simple one (say a "hello world" style one) - just to check that I'm not doing anything the code that would cause the error you're seeing. If that temporary script should work okay - then that would mean I'm doing something in the "normal" .php that introduces these errors. (and for starters you can just comment out all the code (ie: from just after &lt;?php to just before ?&gt, to see that it is read and included correctly.

D.
Hello again, i just converted the script to charset ANSA and now there is no errors..

Its okay if the file is in charset ANSA but i want my signs() to work, and its only working with UTF-8....

But is it possible to turn the standard UTF-8 Header off on some files?
Reply With Quote
  #10  
Old 21st July 2010, 09:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
 
Default

UTF-8 should work fine. Just use a coding editor like notepad++ to save the file in utf-8 format as this does not add any additional headers like e.g. microsoft wordpad.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lots of questions from noob papokergod Installation/Configuration 5 21st January 2009 13:19
Some basic pre-installation questions jeffw85 Installation/Configuration 1 26th November 2007 08:25
Hostname & DNS questions... SurfingAlien Installation/Configuration 6 16th October 2007 16:32
Questions and more questions... ellisgl General 1 21st July 2007 14:52
Many "is this possible?" questions... ClarkVent General 2 6th June 2007 15:35


All times are GMT +2. The time now is 23:10.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.