Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [HTML]Jak wkleić strone do innej ?
kps
post
Post #1





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 14.09.2009

Ostrzeżenie: (0%)
-----


Nie wiem czy dobrze sformułowałem tytuł tematu.

Chodzi mi o to:

Zainstalowałem skrypt newslettera phpmynewsletter, i tam aby ktoś mógł się zapisać, musi wejść na stronę newslettra,
czyli w moim przypadku newsletter.mojastrona.pl, a chciałbym aby formularz był na stronie mojastrona.pl
gdzieś w ramce czy coś.

Jak to zrobić aby przenieść ten formularz na moją stronę ?

To jest źródło ze strony z formularzem:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html
  3. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  4. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  7. <link rel="stylesheet" href="phpmynewsletter.css" type="text/css" />
  8. <title>phpMyNewsletter</title>
  9. </head>
  10. <body>
  11. <script language="JavaScript1.2" type="text/javascript">
  12. function submitform() {
  13. if (document.sub_form.email_addr.value=='')
  14. alert("Niepoprawny e-mail");
  15. else {
  16. if ( ((document.sub_form.email_addr.value.indexOf('@',1))==-1)||(document.sub_form.email_addr.value.indexOf('.',1))==-1 )
  17. alert("Niepoprawny e-mail");
  18.  
  19. else {
  20. window.open("", "formPopup", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizabl
  21. e=0,height=200,width=500,toolbar=no", true);
  22. document.sub_form.target='formPopup';
  23. document.sub_form.submit();
  24. }
  25. }
  26. }
  27. </script><br />
  28.  
  29. <div class='content'><form action="subscription.php" method="post" name="sub_form" target="formPopup" onsubmit="submitform();false;">
  30. <input type="text" size="15" name="email_addr" value="Adres e-mail" onfocus="if (this.value=='Adres e-mail') this.value=''" />
  31.  <input type="button" name="sub" value=" O K " onclick="submitform()" /><br />
  32.  
  33. <input type="radio" class='radio' name="op" value="join" checked="checked" /> Subskrybuj
  34. <input type="radio" class='radio' name="op" value="leave" /> Wypisz z listy mailingowej<input type='hidden' name='list_id' value='1'><input type='hidden' name='popup' value="_popup"> </form>
  35. <div align="center"><a href="archives.php">Przegladaj archiwalne</a></div></div><br /><div align='center'><a href='http://gregory.kokanosky.free.fr/phpmynewsletter/' target='_blank'><img src='img/button_pmnl.png' alt='logo pmnl' title='powered by phpMyNewsletter' border='0' /></a></div></body></html>


Ten post edytował kps 22.01.2010, 02:19:15
Go to the top of the page
+Quote Post
pedro84
post
Post #2





Grupa: Nieautoryzowani
Postów: 2 249
Pomógł: 305
Dołączył: 2.10.2006

Ostrzeżenie: (0%)
-----


Możesz wstawić formularz w ramce <iframe> albo skopiować kod na swoją stronę...
Go to the top of the page
+Quote Post
kps
post
Post #3





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 14.09.2009

Ostrzeżenie: (0%)
-----


tak niestety nie da rady, znalazłem jeszcze w pliku form.php takie coś:

  1. <?php
  2. // you can include this form in any page of
  3. // your website as follow:
  4. //
  5. // in this file, provide correct values for:
  6. // $path_to_pmnl
  7. // $list_id newsletter id
  8. // then in your page (need to be a php page)
  9. // add this line :
  10. // include("path/to/this/page/form.php");
  11. // NOTA: your page need to use UTF8 encoding
  12. // put
  13. // <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  14. // in your html header
  15.  
  16.  
  17.  
  18.  
  19. //path to phpMyNewsletter base directory
  20. $path_to_pmnl="./";
  21.  
  22. // newsletter id, leave this empty if you want to list available
  23. // newsletter.
  24.  
  25. //$list_id = 1;
  26. $list_id = "";
  27.  
  28. //display archive link (true or false) ?
  29. $display_archive=true;
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. ////////////////////// DO NOT MODIFY /////////////////////
  38.  
  39. if(file_exists("./".$path_to_pmnl."include/config.php")){
  40. include("./".$path_to_pmnl."include/config.php");
  41. include("./".$path_to_pmnl."include/db/db_".$db_type.".inc.php");
  42. }
  43. include("./".$path_to_pmnl."include/lib/libconfig.php");
  44. include("./".$path_to_pmnl."include/interface.php");
  45. include("./".$path_to_pmnl."include/lib/libnewsletter.php");
  46. include("./".$path_to_pmnl."admin/include/function.php");
  47.  
  48.  
  49. if(file_exists("./".$path_to_pmnl."include/config.php")){
  50. print newsletter_list($list_id, true, $display_archive);
  51. } else {
  52. include "./".$path_to_pmnl."include/lang/english.php";
  53. echo error_msg(translate("NEWSLETTER_NOT_YET"));
  54. }
  55.  
  56. ?>


mógł by mi to ktoś pomóc pozmieniać aby zadziałało ?
Może też komuś w przyszłości się przyda.
Go to the top of the page
+Quote Post
pedro84
post
Post #4





Grupa: Nieautoryzowani
Postów: 2 249
Pomógł: 305
Dołączył: 2.10.2006

Ostrzeżenie: (0%)
-----


Cytat
// you can include this form in any page of
// your website as follow:
//
// in this file, provide correct values for:
// $path_to_pmnl
// $list_id newsletter id
// then in your page (need to be a php page)
// add this line :
// include("path/to/this/page/form.php");
// NOTA: your page need to use UTF8 encoding
// put
// <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
// in your html header

No przecież masz tutaj wszystko napisane. Troszeczkę inwencji, Kolego (IMG:style_emoticons/default/smile.gif)

Ten post edytował pedro84 22.01.2010, 03:23:32
Go to the top of the page
+Quote Post
kps
post
Post #5





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 14.09.2009

Ostrzeżenie: (0%)
-----


Niestety będę musiał poprosić o pomoc.
Nie wiem jak zrobić żeby to działało, ale postaram się wytłumaczyć co robię:

  1. #
  2. <?php
  3. #
  4. // you can include this form in any page of
  5. #
  6. // your website as follow:
  7. #
  8. //
  9. #
  10. // in this file, provide correct values for:
  11. #
  12. // $path_to_pmnl
  13. #
  14. // $list_id newsletter id
  15. #
  16. // then in your page (need to be a php page)
  17. #
  18. // add this line :
  19. #
  20. // include("path/to/this/page/form.php");
  21. #
  22. // NOTA: your page need to use UTF8 encoding
  23. #
  24. // put
  25. #
  26. // <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  27. #
  28. // in your html header
  29. #
  30.  
  31. #
  32.  
  33. #
  34.  
  35. #
  36.  
  37. #
  38. //path to phpMyNewsletter base directory
  39. #
  40. $path_to_pmnl="http://www.mojastrona.pl";
  41. #
  42.  
  43. #
  44. // newsletter id, leave this empty if you want to list available
  45. #
  46. // newsletter.
  47. #
  48.  
  49. #
  50. //$list_id = 1;
  51. #
  52. $list_id = "";



a w indexsie na mojastrona.pl wstawiam

  1. include("http://newsletter.mojastrona.pl/form.php");


No i wywala mi błędy w liniach, które odnoszą się do pliku form.php czyli :

  1. ////////////////////// DO NOT MODIFY /////////////////////
  2.  
  3. if(file_exists("./".$path_to_pmnl."include/config.php")){
  4. include("./".$path_to_pmnl."include/config.php");
  5. include("./".$path_to_pmnl."include/db/db_".$db_type.".inc.php");
  6. }
  7. include("./".$path_to_pmnl."include/lib/libconfig.php");
  8. include("./".$path_to_pmnl."include/interface.php");
  9. include("./".$path_to_pmnl."include/lib/libnewsletter.php");
  10. include("./".$path_to_pmnl."admin/include/function.php");
  11.  
  12.  
  13. if(file_exists("./".$path_to_pmnl."include/config.php")){
  14. print newsletter_list($list_id, true, $display_archive);
  15. } else {
  16. include "./".$path_to_pmnl."include/lang/english.php";
  17. echo error_msg(translate("NEWSLETTER_NOT_YET"));
  18. }



Prosił bym o pomoc.
Już nawet kupiłem jeden autoresponder na allegro dobrze że tylko 2 zł wydałem bo syf straszny nawet się mailingów nie dało wysłać.
Go to the top of the page
+Quote Post
pedro84
post
Post #6





Grupa: Nieautoryzowani
Postów: 2 249
Pomógł: 305
Dołączył: 2.10.2006

Ostrzeżenie: (0%)
-----


Cytat(kps @ 26.01.2010, 02:31:07 ) *
No i wywala mi błędy w liniach, które odnoszą się do pliku form.php czyli :

Jakie błędy? Mogłeś napisać (IMG:style_emoticons/default/smile.gif) Ścieżki masz poprawne?
Go to the top of the page
+Quote Post
kps
post
Post #7





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 14.09.2009

Ostrzeżenie: (0%)
-----


failed to open stream: No such file or directory
Failed opening './http://newsletter.mojastrona.pl/include/interface.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')


coś takiego mi wywala
Go to the top of the page
+Quote Post
palonek
post
Post #8





Grupa: Zarejestrowani
Postów: 32
Pomógł: 2
Dołączył: 19.04.2009

Ostrzeżenie: (0%)
-----


Cytat
failed to open stream: No such file or directory
Failed opening './http://newsletter.mojastrona.pl/include/interface.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')

$path_to_pmnl="http://www.mojastrona.pl";


nie znajduje pliku bo podajesz adres URL strony, a nie nazwe katalogu ze skryptem newslettera.

Ten post edytował palonek 26.01.2010, 08:02:58
Go to the top of the page
+Quote Post
kps
post
Post #9





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 14.09.2009

Ostrzeżenie: (0%)
-----


wpisałem: mojastrona.pl - bo taki mam folder na serwerze ale to nie pomogło, może ktoś wie jak to wpisać tak żeby działało
Go to the top of the page
+Quote Post
pedro84
post
Post #10





Grupa: Nieautoryzowani
Postów: 2 249
Pomógł: 305
Dołączył: 2.10.2006

Ostrzeżenie: (0%)
-----


Cytat(kps @ 26.01.2010, 16:01:38 ) *
wpisałem: mojastrona.pl - bo taki mam folder na serwerze ale to nie pomogło, może ktoś wie jak to wpisać tak żeby działało

Musisz po prostu podać poprawną ścieżkę, skąd niby mamy wiedzieć jaką masz strukturę katalogów na serwerze?
Go to the top of the page
+Quote Post
kps
post
Post #11





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 14.09.2009

Ostrzeżenie: (0%)
-----


dobra napisze to tak jak jest u mnie bo to trochę się namieszało:

mam stronę "grupakj.pl" - folder na serwerze to grupakj.pl

a strona gdzie zainstalowałem newsletter to "newsletter.grupakj.pl" z tym że folder na serwerze nazywa się kjnewsletter

Czy teraz wiecie może jak to poprawnie wpisać ?

Błędy można zobaczyć pod www.grupakj.pl
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 12:53