النتائج 1 إلى 4 من 4

الموضوع: اضافة textarea جديدة عند اضافة موضوع

  1. #1

    مساعدة :: اضافة textarea جديدة عند اضافة موضوع



    السلام عليكم
    اخواني الكرام .. اريد ان أضيف مربع جديد ( textarea )
    يضع فيها كاتب الموضوع معلومات اضافية .

    طبعا كما تعلمون الموضوع يحتاج ايضا تعديل في قاعدة البيانات لادراج المعلومات الجديدة في القاعدة

    وجدت موضوع يتحدث عن ذلك في موقع vbulletin.org

    وهذا رابط الموضوع : [HOW TO] Add custom fields to new threads - vBulletin.org Forum

    ولكن المشكلة انه لا يوجد لدي رخصة حتى استطيع مشاهدة الكودات

    فأرجوا إن كان باستطاعة أحد منكم أن ينسخ الكودات ويضعها هنا فله جزيل شكري وامتناني .

    وإذا كان يوجد أي موضوع ممكن ان يساعد أو يتكلم عن شيئ مشابه فأرجوا ألاّ تبخلو به علينا

    وجزاكم الله خيرا





    __________________
    سبحان الله و بحمده سبحان الله العظيم
    ماسنجر : ii.i@hotmail.com
    الموقع الشخصي : www.am4design.com
    أكافي الصناعي : www.akafi.net


  2. #2
    عضو نشيط
    تاريخ التسجيل
    May 2007
    المشاركات
    172


    1. To add the fields to the thread table in the database:

    Go into admincp and down to the bottom. Select Execute SQL Query and then add your fields as follows:


    Code:
    كود PHP:
    ALTER TABLE table ADD ( var VARCHAR(10not null default ''
    Where table is the name of your vb thread table (eg vb_thread) and var is the name of the field you are adding.

    2. Add the fields to the newthread template in admincp / style manager

    Find
    Code:

    كود HTML:
    <if condition="$show['misc_options']">
    and above that add:


    Code:
    كود HTML:
    <div style="padding:$stylevar[formspacer]px"><div><input type="text" class="bginput" size="10" name="var" value="" id="var" tabindex="1" /> $vbphrase[var_name]</div>
    Again, var is the name of the field and the same as in the previous SQL Query. You can smarten this up further using the fieldset tags and creating a custom vbphrase for the $vbphrase[your_phrase] part :


    Code:
    كود HTML:
    <fieldset class="fieldset"><legend>$vbphrase[your_phrase]</legend>above code in here</fieldset>
    3. Go to admincp / add new plug in and add the following three plugins (give them the same name so you recognise them later):

    newpost_process


    Code:
    كود PHP:
    if ($type == 'thread'){ $dataman->setr('var'$post['var']);} 
    newthread_post_start


    Code:
    كود PHP:
    $vbulletin->input->clean_array_gpc('p', array('var' => TYPE_STR));$newpost['var'] =& $vbulletin->GPC['var']; 
    threadfpdata_start


    Code:
    كود PHP:
    $this->validfields['var'] = array(TYPE_STRREQ_NO); 
    Once again, var is the name of the variable you have been using for your field name above.

    I hope this helps - took me a while to get it sorted (and I did find help on here along the way) but this is the completed process.






  3. #3


    الأخ ( المطلوووب ) جزاك الله خير الجزاء

    قمت بالعمل و نجح ذلك و تم إدخال المعلومات في قاعدة البيانات
    وكذلك تم عرض المعلومات المدخلة في الموضوع ...





    __________________
    سبحان الله و بحمده سبحان الله العظيم
    ماسنجر : ii.i@hotmail.com
    الموقع الشخصي : www.am4design.com
    أكافي الصناعي : www.akafi.net

  4. #4

    طلب مساعدة



    السلام عليكم
    اخواني هل من طريقة لتعديل هذه المعلومات التي تم ادخالها في قاعدة البيانات
    نجحت بالحصول على المعلومات و عرضها في textarea اسمها " nbza " قي قالب
    editpost
    كود HTML:
    <textarea name="nbza" cols="40" rows="4">$threadinfo[nbza]</textarea>

    قمت بعمل 3 بلوجن ( plugin ) من اجل عملية التعديل حيث يوجد فيها عمليات مشابهة لما يجري في صفحة editpost.php :

    موقع (hook) الخطاف : editpost_start
    كود PHP:
    $vbulletin->input->clean_array_gpc('p', array('nbza'=> TYPE_STR)); 
    موقع (hook) الخطاف : editpost_update_start
    كود PHP:
    $edit['nbza'] =& $vbulletin->GPC['nbza']; 
    موقع (hook) الخطاف : editpost_update_process
    كود PHP:
    if ($type == 'thread'){ $dataman->setr('nbza'$edit['nbza']);} 
    لكن لم انجح في التعديل
    فأرجوا المساعدة مع الشكر





    __________________
    سبحان الله و بحمده سبحان الله العظيم
    ماسنجر : ii.i@hotmail.com
    الموقع الشخصي : www.am4design.com
    أكافي الصناعي : www.akafi.net





ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  

أضف موقعك هنا| اخبار السيارات | حراج | شقق للايجار في الكويت | بيوت للبيع في الكويت | دليل الكويت العقاري | مقروء | شركة كشف تسربات المياه | شركة عزل اسطح بالرياض | عزل فوم بالرياض| عزل اسطح بالرياض | كشف تسربات المياة بالرياض | شركة عزل اسطح بالرياض