لاتدعم جميع السيرفرات نظام SSI وفي الحالة هذه كيف يمكن استدعاء سكربت من نوع cgi او pl ضمن وثيقة تحمل الملحق html وليس الملحق shtml؟
لاتدعم جميع السيرفرات نظام SSI وفي الحالة هذه كيف يمكن استدعاء سكربت من نوع cgi او pl ضمن وثيقة تحمل الملحق html وليس الملحق shtml؟
حقيقة كنت أبحث منذ فترة طويلة عن حل لهذة المشكلة ولكن لم أجده وما خليت صفحة أجنبية تهتم بهال المواضيع إلا بحثت فيها
اخي سوالف
هذا السكربت كما يقول مؤلفه يحقق ما نبحث عنه عبر الجافا. ولكنني عندما جربته اعطاني صفحة بيضاء. من فضلك ـ والدعوة موجهة لجميع القراء ـ اختبروه، واذا نجحتم في جعله يعمل امدوني بالنسخة المصححة منه ولكم الشكر.
نص الموضوع:
Hi, I got this idea yesterday while swearing over the fact that cgi generated html pages can't do server includes.
Synopsis:
I want to be able to include a random text in the html footer of every ubb page.
I thought that Javascript would be able to do that task... so I've come up with this:
In the body of the html document put this:
code:
<SCRIPT>
< !-- random powertips
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd() {
rnd.seed = (rnd.seed*9301+49297) % 233280;
return rnd.seed/(233280.0);
};
function rand(number) {
return Math.ceil(rnd()*number);
};
// end random powertips -->
</SCRIPT>
and where you want the output displayed, put this:
code:
<SCRIPT LANGUAGE="JavaScript1.2">
< !--
document.write('<SCRIPT LANGUAGE="JavaScript1.2" SRC="http://yourdomain.com/script/powertips' + rand(11) + '.js"><\/SCRIPT>');
//-->
</SCRIPT>
This is the contents of one of the .js files,
powertips1.js:
code:
document.writeln(" GET ORGANIZED!
Are Are you ready to \'Get Organized\' this new year?
Many people start the process and give up
because they started with very high expectations.
Here are some reminders
when making a resolution to \'Get
Organized\':
Be realistic about the time
involved in getting organized. If you have
been disorganized for a long time, then it
will take a while to get better
organized.
Find someone who can support
you in the process. You may need someone to
physically sit with you while you tackle
some of your clutter. Another idea you can
consider is to have a friend sit with you on
the other end of the phone and talk with you
as you sort and purge papers for 15
minutes.
By Michelle
Santaferarro,
<a href='http://www.organomics.com' target='_blank'>Organomics</A></p>");
The file must not have ANY carriage returns in it.
Conclusion:
The RND(X) variable contains the randomized number. Instead of the X you should put the number of files that you have.
You can use ANY HTML in the .js file, just remember to put a backslash \ in front of ' " and front slashes /
Tip:
Layout the text in a HTML editor and just add
code:
document.writeln("
in front o the html and
code:
");
in the end.
Remember to delete ALL carriage returns before saving the .js file.
This should work perfectly!
NO MORE SSI PROBLEMS!
-----
Oh, I almost forgot,
You can have an image displayed instead of text. (ad banners, etc.)
add this line to the display script:
code:
<SCRIPT LANGUAGE="JavaScript">
< !--
document.write('<IMG SRC="banner' + rand(10) + '.gif"
WIDTH="400" HEIGHT="40">');
//-->
</SCRIPT>
You can use any of these display scripts depending on if you want random text or random images!
Have fun!
DJ Tanga-T[/B]
لم يظهر النص الذي ارسلته كاملا وها انا اعيد ارساله.
اذا وجدتم علامة كهذه قبل السكربت //// اي مكررة اكثر من مرتين احذفوها فقد اضفتها لاعتقادي بوجود تعارض في الكودات.
Hi, I got this idea yesterday while swearing over the fact that cgi generated html pages can't do server includes.
Synopsis:
I want to be able to include a random text in the html footer of every ubb page.
I thought that Javascript would be able to do that task... so I've come up with this:
In the body of the html document put this:
----------------
code:
---------------------
\\\\\<SCRIPT>
< !-- random powertips
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd() {
rnd.seed = (rnd.seed*9301+49297) % 233280;
return rnd.seed/(233280.0);
};
function rand(number) {
return Math.ceil(rnd()*number);
};
// end random powertips -->
</SCRIPT>
----------------------
and where you want the output displayed, put this:
----------
code:
----------------
//// <SCRIPT LANGUAGE="JavaScript1.2">
< !--
document.write('<SCRIPT LANGUAGE="JavaScript1.2" SRC="http://yourdomain.com/script/powertips' + rand(11) + '.js"><\/SCRIPT>');
//-->
</SCRIPT>
-----------------
This is the contents of one of the .js files,
powertips1.js:
-----------------------
code:
-----------------------
document.writeln(" GET ORGANIZED!
Are Are you ready to \'Get Organized\' this new year?
Many people start the process and give up
because they started with very high expectations.
Here are some reminders
when making a resolution to \'Get
Organized\':
Be realistic about the time
involved in getting organized. If you have
been disorganized for a long time, then it
will take a while to get better
organized.
Find someone who can support
you in the process. You may need someone to
physically sit with you while you tackle
some of your clutter. Another idea you can
consider is to have a friend sit with you on
the other end of the phone and talk with you
as you sort and purge papers for 15
minutes.
By Michelle
Santaferarro,
<a href='http://www.organomics.com' target='_blank'>Organomics</A></p>");
-----------------------------
The file must not have ANY carriage returns in it.
Conclusion:
The RND(X) variable contains the randomized number. Instead of the X you should put the number of files that you have.
You can use ANY HTML in the .js file, just remember to put a backslash \ in front of ' " and front slashes /
Tip:
Layout the text in a HTML editor and just add
---------------------
code:
------------------------
document.writeln("
-----------------
in front o the html and
---------------------
code:
---------------------
");
--------------------------
in the end.
Remember to delete ALL carriage returns before saving the .js file.
This should work perfectly!
NO MORE SSI PROBLEMS!
-----
Oh, I almost forgot,
You can have an image displayed instead of text. (ad banners, etc.)
add this line to the display script:
---------------------
code:
-------------------------------
//// <SCRIPT LANGUAGE="JavaScript">
< !--
document.write('<IMG SRC="banner' + rand(10) + '.gif"
WIDTH="400" HEIGHT="40">');
//-->
</SCRIPT>
-------------------
You can use any of these display scripts depending on if you want random text or random images!
Have fun!
DJ Tanga-T[/B]
مرة اخرى لم يظهر النص كاملا. سأرسله لك بالبريد.
السلام عليكم اخوتي
انا عندي الحل واقسم على ذالك والحل سهل جدا ولكن قبل ان اعطيكم الحل ارجو ان تساعدوني في هذا الموضوع وانا اعدكم ان اعطيكم الحل http://www.swalif.net/swalifsoft/ubb...ML/000427.html
اخي الكريم للاسف لا اعرف اي شئ عن البرنامج الذي تسأل عنه autorink pro والا كان بودي افادتك بشئ.
في حلين أو ثلاثة حلول تقريبا:
1) انك تتخلص من برنامج البيرسونال ويب سيرفر حق مايكروسوفت المعروف ياسم "مستر كراش" وتركب لك سيرفر محترم ومجاني وقوي وهو أباتشي http://www.apache.org ، مع العلم انه توجد منه نسخة خاصة بويندوز98 مجانية، ورح تنحل جميع مشاكلك مثل السيرفر سايد انكلودز والسيند ميل لما يعلق السيرفر وتعال حلني لما اطفي الجهاز واشغله عشان اعمل ريستارت لسيرفر.
2) الحل الثاني انك تستخدم IIS 5.0 وهو يأتي مع ويندوز 2000 ومن خلال هاذا البرنامج تستطيع تخصيص الملفات التي يجب أضافة هيدر اليها مثل filename.shtml أو حتى جعل السيرفر يعالج جميع الملفات على أنها SSI filez وطبعا هاذا غير الميزات الثانية مثل دعمه للفلوك.
3) الحل الثالث "وأعتقد انه هاذا هو الحل اللي يقصده الأخ ولد الإمارات" هو انك مثلا تبغا تعمل سيرفر سايد انكلود لسكربت اسمها file.cgi وطبعا ما تقدر تستخدم الكود هاذا في PWS :
<BLOCKQUOTE><font size="1" face=" Arial">code:</font><HR><pre>
< !--#exec cgi="file.cgi "-->
[/code]
والحل غير العملي هو وضع هاذا الكود "مع التحكم في حجم الفريم (الطول والعرض) حتى يناسب النتيجة":
<BLOCKQUOTE><font size="1" face=" Arial">code:</font><HR><pre>
<iframe src="http://127.0.0.1/anywhere/file.cgi" width=100 height=100 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>
[/code]
اخي الكريم النديم
الامر في الواقع لايتعلق بالسيرفر التخيلي على الكومبيوتر الشخصي، ولكنه عن بعض الشركات التي تعطي مساحة مجانية ولكنها احيا لاتكون تدعم ssi . اشكر لك اهتمامك.
بالمناسبة حاولت تركيب الاباشي مع ويندوز 98 ولكنه لم يعطني واجهة استخدام مألوفة لويندوز ويبدو ان لديه طريقة اقرب الى الدوز لادخال الاوامر.
ببساطه إستخدم الوسم
IFRAME
يعني تكتب
<BLOCKQUOTE> <font> كود: </font> <div align="ltr"> <center> <table border="0" width="80%" dir="ltr" bgcolor=="#000000"> <tr> <td width="100%"> <pre> <font color="#ffffff">
<IFRAME SRC=YourCGI.CGI>
</IFRAME>
</font> </pre> </td> </tr> </table> </center> </div> </BLOCKQUOTE>