سلام میشه نحوه include php رو توی قالب توضیح بدین
مثلا include php در forumhomeبـا تـشکـر
مهمان گرامی به ویبی اسکین خوش آمدید - برای ثبت نام کلیک کنید ! برای جستجو در سایت از این موتور جستجوی گوگل می توانید استفاده کنید
سلام میشه نحوه include php رو توی قالب توضیح بدین
مثلا include php در forumhomeبـا تـشکـر
ویرایش توسط abbasi_0912 : 08-28-2010 در ساعت 07:49
دوستان و همکاران عزیز
در پیغام خصوصی به سوالات و موارد شما پاسخ داده نخواهد شد
مگر انهایی که کار طراحی دارند
لطفا مزاحم نشوید و در سایت مطرح بکنید
در روزگاری که لبخند آدمها بخاطر شکست توست ، برخیز تا بگریند آدمها ( کوروش کبیر )ساعات تماس : 10 & 14 - 18 & 23
09386942162
vbsaz.ir@gmail.com
![]()
به این مطلب که از راهنمای ویبی 4 گرفتم نگاه کن، من تا یه جاهایی پیش رفتم اما نتیجه کد رو نشون نمیده، اخطار هم نمیده
Including External Files
Warning:
This is considered modifying the code. To get further help and support with including external files you will need to visit [برای مشاهده لینک ها شما باید عضو سایت باشید برای عضویت در سایت بر روی اینجا کلیک بکنید].
If you have a PHP or HTML file that you want to include in your vBulletin forum, create a plugin that references that file. Then add a variable to the template of your choice where that file's contents should appear.
Note:
The Plugin system must be enabled in vBulletin Options -> Plugin System for plugins to work. It is disabled by default.
Including an HTML file:
1. Create a Plugin for global_start with this code:
Replace the path and filename with the correct path and filename of the HTML file you want to include. The contents of myfile.html will be copied to the variable $includedhtml.کد:$includedhtml = implode('', file('path/to/this/file/myfile.html'));
2. Place {vb:raw includedhtml} in one of your templates, such as header, navbar, FORUMHOME, depending upon where you want the contents of your HTML file to appear.
Including a PHP file:
1. Create a Plug-in for global_start with these contents:
Replace the path and filename with the correct path and filename of the PHP file you want to include. The code in myfile.php will execute and any output generated by this script will be stored in $includedphp.کد:ob_start(); include('path/to/this/file/myfile.php'); $includedphp = ob_get_contents(); ob_end_clean();
2. Place {vb:raw includedphp} in one of your templates, such as header, navbar, FORUMHOME, depending upon where you want the contents of your PHP file to appear.
Warning:
Plugins that contain invalid or malicious code may cause your forum to stop functioning or even lead to data loss. Using Plugins is not supported and you'll be asked to disable them in the event that you request tech support. If a Plugin has made your forum inaccessible, please disable plugins. Troubleshooting errant plugins and products is handled at our sister site, [برای مشاهده لینک ها شما باید عضو سایت باشید برای عضویت در سایت بر روی اینجا کلیک بکنید].
What is Output Buffering?
Most PHP files that you might wish to include in your forum contain echo or other output statements in your PHP file, it will break vBulletin because it is still in the process of initializing when it loads your PHP file. All echo and other output commands must be output buffered using ob_start, ob_clean, etc. commands. The output of your PHP script will be buffered for later use and inserted into a variable. All other statements in the PHP script will execute normally.
A word about variables.
It is very important that any variables initialized in your PHP script do not overlap built-in vBulletin variables or you will get unpredictable results. It may be advisable to create a PHP script just for inclusion in your forum rather than including a larger script used by another part of your website.
Variables are also subject to scope. You may need to access your variable out of the $global array like {vb:raw global.variablename} instead of simply {vb:raw variablename}. You may also need work with a hook location that is more accessible to the template that you wish to alter.
Please see the PHP documentation for more information on variable scope:
[برای مشاهده لینک ها شما باید عضو سایت باشید برای عضویت در سایت بر روی اینجا کلیک بکنید]
Registering Variables
In vBulletin 4+, you need to register variables for them to be available in specific templates and usable. You would do this with code like this:
Replace FORUMHOME with the template you want to include your value in.کد:vB_Template::preRegister('FORUMHOME',array('includedphp ' => $includedphp));
Which hook should I use?
The hook used above (global_start) makes your HTML or PHP file available in almost every template on your vBulletin forum. You may wish to include a PHP file or HTML file only on certain pages or parts of your forum. You'll need to select the correct hook where your code should be loaded. To determine which hook you should use, turn on Debug and then make this change to the appropriate functions php file.
How do I turn on debug mode?
Please note that you should not turn on debug mode in a live environment.
Open the config.php file.
At the top, on a new line below <?php
add: $config['Misc']['debug'] = true;
Note:
If you wish to include() multiple PHP files, make sure you use ob_clean() before each include() to reset the buffer.
لینک مطلب رو قرار بدید خودم برسی بکنم
دوستان و همکاران عزیز
در پیغام خصوصی به سوالات و موارد شما پاسخ داده نخواهد شد
مگر انهایی که کار طراحی دارند
لطفا مزاحم نشوید و در سایت مطرح بکنید
در روزگاری که لبخند آدمها بخاطر شکست توست ، برخیز تا بگریند آدمها ( کوروش کبیر )ساعات تماس : 10 & 14 - 18 & 23
09386942162
vbsaz.ir@gmail.com
![]()
این مطلب رو از راهنمای ویبی گرفتم
این هم لینکش
[برای مشاهده لینک ها شما باید عضو سایت باشید برای عضویت در سایت بر روی اینجا کلیک بکنید]
توی اینجا در بخش 2 نوشته
برای نمایش این محصول شما این کد را
{vb:raw includedphp}
درون بخشش هایی که می خواید این صفحه php نمایش بده استفاده بکنید
========
من خاطرم هست چند وقت پیش هم شما دنبال یه موردی مثل این بودی
دقیق بگی چی می خوای انجام بدی شاید بتونم راهنمایی بکنم
حدف از این کار رو بگو تا اگر کار ساده ای به ذهنم رسید بهت بگم
دوستان و همکاران عزیز
در پیغام خصوصی به سوالات و موارد شما پاسخ داده نخواهد شد
مگر انهایی که کار طراحی دارند
لطفا مزاحم نشوید و در سایت مطرح بکنید
در روزگاری که لبخند آدمها بخاطر شکست توست ، برخیز تا بگریند آدمها ( کوروش کبیر )ساعات تماس : 10 & 14 - 18 & 23
09386942162
vbsaz.ir@gmail.com
![]()
سلام، دوست عزیز من می خواهم یک صفحه جدید توی ویبی ایجاد کنم به نام تبادل لینک، و لینک اون رو بزارم بالای انجمن، و با کلیک روی اون صفحه جدید نمایش داده بشه، که همه چیز داره فقط وسط صفحه خالی هست و به جای محتویات انجمن یک اسکریپت php رو include کنم توی اون صفحه
قبل از ایجاد این تایپک این کار و کردم و {vb:raw includedphp} رو وارد کردم اما چیزی نشون نمیده، حداقل اخطار هم نمی ده که بگیم مشکل برنامه نویسی هست
برسی بکن ببین اینها بدردت می خورن یا نه
[برای مشاهده لینک ها شما باید عضو سایت باشید برای عضویت در سایت بر روی اینجا کلیک بکنید]
دوستان و همکاران عزیز
در پیغام خصوصی به سوالات و موارد شما پاسخ داده نخواهد شد
مگر انهایی که کار طراحی دارند
لطفا مزاحم نشوید و در سایت مطرح بکنید
در روزگاری که لبخند آدمها بخاطر شکست توست ، برخیز تا بگریند آدمها ( کوروش کبیر )ساعات تماس : 10 & 14 - 18 & 23
09386942162
vbsaz.ir@gmail.com
![]()
درود:
من در حدی نیستم که در کار افرادی مثل جناب بهرام دخالت کنم اما برای این کار یک اسکریپت هم هست که نمیدونم در سایت قرار داره یا نه مخصوص همین کار که یک صفحه برای تبادل لینک ایجاد میکنه صفحه سادست
اما خوب اسکریپت یک بدی که داره از سرور خیلی کار میکشه و به مشکل برمیخورین
دوستان و همکاران عزیز
در پیغام خصوصی به سوالات و موارد شما پاسخ داده نخواهد شد
مگر انهایی که کار طراحی دارند
لطفا مزاحم نشوید و در سایت مطرح بکنید
در روزگاری که لبخند آدمها بخاطر شکست توست ، برخیز تا بگریند آدمها ( کوروش کبیر )ساعات تماس : 10 & 14 - 18 & 23
09386942162
vbsaz.ir@gmail.com
![]()
در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)
کاربران خواننده این موضوع : 27فعالیت :(نمایش - خوانندگان)
علاقه مندی ها (Bookmarks)