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

الموضوع: كيف أحذف هالعمود من قاعدة البيانات؟

  1. #1
    عضو نشيط جدا
    تاريخ التسجيل
    Sep 2006
    المشاركات
    388

    كيف أحذف هالعمود من قاعدة البيانات؟



    السلام عليكم ورحمة الله وبركاته

    لدي برمجية مخصصة للفيديو مدمجة بسكربت الفيبولتن ولكني أستخدمها كمعرض للصور، عند اضافة صورة جديدة يأتي مستطيل لكتابة رابط الفيديو من اليوتيوب وأريد الاستغناء وحذف هذا المستطيل نهائيا لأني أستخدمها كمعرض للصور فقط، المهم قمت بحذف المستطيل من القوالب واختفى الخيار لكن صار يطالبني بملئ الخانة أيضا، دخلت على ملف الـ submit وحذفت كلما يتعلق بهذه الخانة وأيضا صار يقولي (الخانة service ID فارغة - الخانة servive VAL فارغة) وبذلك لا اتمكن من اتمام الاصافة دون وضع رابط لليوتيوب، هل أقوم بحذف الأعمدة الخاصة بهالخانة من قاعدة البيانات وراح تنحل المشكلة؟؟ وكيف؟

    الصورة التالية توضح الأعمدة الغير المطلوبة والتي أريد الاستغناء عنها بحيث ما يطالبني بملئها أثناء اضافة صورة جديدة:
    (الكود الموجود في العمود service VAL هو رقم الفيديو في اليوتيوب)







    التعديل الأخير تم بواسطة sadiq6210 ; 27-01-2011 الساعة 08:57 PM


  2. #2
    عضو شرف
    تاريخ التسجيل
    May 2007
    المشاركات
    1,647


    بإمكانك بدلاً من هذا أن تبحث عن الحقل الذي تكتب فيه الرابط، الكود سيكون مشابهاً لـ:
    كود:
    <input type="text" />
    طبعاً بغض النظر عن تكملة الكود، المهم أنه من الممكن أن تغيّر خاصية type إلى hidden بدلاً من text ، وتضيف value له برابط وهمي، مثلاً:
    إذا كان يجب أن يكون الرابط هو رابط يوتيوب، أو أي كلمة أخرى إن لم يكن مطلوباً ..

    هذه ستسهّل عليك المهام البرمجية الأخرى، إن كنت مصرّاً على طريقتك يمكننا مساعدتك إن شاء الله إذا أمددتنا بالمزيد من التفاصيل ..

    تحياتي،





    __________________
    # اتبعني على Twitter
    # عِرفان ساهم ببناء المحتوى العربي العلمي على الإنترنت!

  3. #3
    عضو نشيط جدا
    تاريخ التسجيل
    Sep 2006
    المشاركات
    388


    هذا هو الكود عزيزي للخانة المطلوب حذفها

    كود:
    	<div class="mediarow" style="margin-bottom: {vb:stylevar media_margin}px;">
    		<b>{vb:phrase media_url}:</b>&nbsp;&nbsp;
    		<input type="text" class="primary full textbox" name="source" id="source" style="width: 65%;" value="{vb:var feed.source}" />&nbsp;&nbsp;
    		<input type="submit" class="button" name="getxmlfeeds" id="getxmlfeeds" value="{vb:phrase media_submit_retrieve}" />
    	</div>
    
    	<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
    	<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
    	<input type="hidden" name="do" value="submit" />

    بالفعل جربت الفكرة اللي أشرت إليها مشكور قبل كتابة هذا الموضوع بالتحويل إلى hidden ثم اضافة رابط في الـ value وأضفت الصورة الأولى بنجاح، ولكن لما جيت أضيف الصورة الثاني ظهرت لي رسالة مفادها ان رابط الفيديو مستخدم مسبقا وتم اضافته مسبقا :court: << ماقدرت ألعب عليه






  4. #4
    عضو شرف
    تاريخ التسجيل
    May 2007
    المشاركات
    1,647


    المشكلة اني لا أعرف بالكود الخاص بقوالب الفي بي، هل يمكنك الحصول على متغير الوقت أو متغير عشوائي؟ يمكن استخدامه في القيمة لحل المشكلة مثلاً !





    __________________
    # اتبعني على Twitter
    # عِرفان ساهم ببناء المحتوى العربي العلمي على الإنترنت!

  5. #5
    عضو نشيط جدا
    تاريخ التسجيل
    Sep 2006
    المشاركات
    388


    المشكلة اني لا أعرف بالكود الخاص بقوالب الفي بي، هل يمكنك الحصول على متغير الوقت أو متغير عشوائي؟ يمكن استخدامه في القيمة لحل المشكلة مثلاً !
    اطلع على هالملفين عزيزي الخاصين بزر الـ SUBMBIT ربما يمكنك ايجادة فكرة لتعطيل زرع القيمة SERVICE ID و SERVICE VAL

    واذا أردت ممكن يتم تزويدك بالمعلومات لتطلع على السكربت من قريب

    بارك الله فيك





    الملفات المرفقة الملفات المرفقة

  6. #6


    يالغالي قم باستبدال ملف media_submit.php

    بالكود التالي [ استبدل كافة الملف ]

    كود PHP:
    <?php
    /*======================================================================*\
    || #################################################################### ||
    || # Media Library 4.0.0 (media/media_submit.php)                     # ||
    || # ---------------------------------------------------------------- # ||
    || # Copyright ©2010 Jason Axelrod. All Rights Reserved.              # ||
    || # This file may not be redistributed without permission.           # ||
    || #################################################################### ||
    \*======================================================================*/

    if (!$perms['submit'])
    {
        
    print_no_permission();
    }

    if (
    $do == "submit")
    {
        
    $vbulletin->input->clean_array_gpc('p', array(
            
    'source'    => TYPE_STR,
            
    'category'    => TYPE_UINT,
        ));

        
    $source $vbulletin->GPC['source'];
        
    $categoryID $vbulletin->GPC_exists['category'] ? $vbulletin->GPC['category'] : $cid;
        
    $catselect construct_cat_bits($categoryID);

        if (
    $source) { $feed construct_feed_data($source); }

        require_once(
    DIR '/includes/functions_editor.php');
        
    $editorid construct_edit_toolbar($feed['description'],0,'nonforum',1,1,0,'fe');

        
    $navbits[''] = $vbphrase['media_submit'];

        
    $forum fetch_foruminfo($vbulletin->options['media_submit_forum']);

        
    $templater vB_Template::create('8WR_media_submit');
            
    $templater->register('categoryID'$categoryID);
            
    $templater->register('catselect'$catselect);
            
    $templater->register('feed'$feed);
            
    $templater->register('editorid'$editorid);
            
    $templater->register('messagearea'$messagearea);
            
    $templater->register('source'$source);
            
    $templater->register('forum'$forum);
        
    $mediaHTML $templater->render();
    }

    if (
    $do == "submit_feed")
    {
        
    $vbulletin->input->clean_array_gpc('p', array(
            
    'source'    => TYPE_STR,
        ));

        
    $source $vbulletin->GPC['source'];

        
    $feed construct_feed_data($source);

        
    $xml = new vB_AJAX_XML_Builder($vbulletin'text/xml');
        
    $xml->add_group('response');
        
    $xml->add_tag('thumbnail'$feed['thumbnail']);
        
    $xml->add_tag('title'$feed['title']);
        
    $xml->add_tag('description'$feed['description']);
        
    $xml->add_tag('taglist'$feed['taglist']);
        
    $xml->add_tag('minutes'$feed['minutes']);
        
    $xml->add_tag('seconds'$feed['seconds']);
        
    $xml->add_tag('embed'$feed['embed']);
        
    $xml->add_tag('source'$feed['source']);
        
    $xml->add_tag('serviceID'$feed['serviceID']);
        
    $xml->add_tag('serviceVAL'$feed['serviceVAL']);
        
    $xml->add_tag('serviceVAL2'$feed['serviceVAL2']);
        
    $xml->close_group();
        
    $xml->print_xml();
    }

    if (
    $do == "submit_data")
    {
        
    $vbulletin->input->clean_array_gpc('p', array(
            
    'category'        => TYPE_UINT,
            
    'serviceID'        => TYPE_UINT,
            
    'serviceVAL'    => TYPE_STR,
            
    'serviceVAL2'    => TYPE_STR,
            
    'title'            => TYPE_STR,
            
    'message'        => TYPE_STR,
            
    'minutes'        => TYPE_UINT,
            
    'seconds'        => TYPE_UINT,
            
    'custom1'        => TYPE_STR,
            
    'custom2'        => TYPE_STR,
            
    'custom3'        => TYPE_STR,
            
    'custom4'        => TYPE_STR,
            
    'custom5'        => TYPE_STR,
            
    'custom6'        => TYPE_STR,
            
    'custom7'        => TYPE_STR,
            
    'custom8'        => TYPE_STR,
            
    'custom9'        => TYPE_STR,
            
    'source'        => TYPE_STR,
            
    'thumbnail'        => TYPE_STR,
            
    'taglist'        => TYPE_NOHTML,
            
    'newthread'        => TYPE_STR,
            
    'wysiwyg'        => TYPE_BOOL,
        ));

        
    $categoryID $vbulletin->GPC['category'];
        
    $serviceID $vbulletin->GPC['serviceID'];
        
    $serviceVAL $vbulletin->GPC['serviceVAL'];
        
    $serviceVAL2 $vbulletin->GPC['serviceVAL2'];
        
    $title $vbulletin->GPC['title'];
        
    $description $vbulletin->GPC['message'];
        
    $minutes $vbulletin->GPC['minutes'] * 60;
        
    $seconds $vbulletin->GPC['seconds'];
        
    $length $minutes $seconds;
        
    $custom1 $vbulletin->GPC['custom1'];
        
    $custom2 $vbulletin->GPC['custom2'];
        
    $custom3 $vbulletin->GPC['custom3'];
        
    $custom4 $vbulletin->GPC['custom4'];
        
    $custom5 $vbulletin->GPC['custom5'];
        
    $custom6 $vbulletin->GPC['custom6'];
        
    $custom7 $vbulletin->GPC['custom7'];
        
    $custom8 $vbulletin->GPC['custom8'];
        
    $custom9 $vbulletin->GPC['custom9'];
        
    $visible "visible";

        
    $thumbnail $vbulletin->GPC['thumbnail'];
        
    $taglist $vbulletin->GPC['taglist'];
        
    $newthread $vbulletin->GPC['newthread'];
        
    $wysiwig $vbulletin->GPC['wysiwyg'];

        if (
    $wysiwyg)
        {
            require_once(
    DIR '/includes/functions_wysiwyg.php');
            
    $description convert_wysiwyg_html_to_bbcode($descriptionfalse);
        }

        
    $dm =& datamanager_init('Media'$vbulletin);
        
    $dm->setr('categoryID'$categoryID);
        
    $dm->setr('title'$title);
        
    $dm->setr('description'$description);
        
    $dm->setr('length'$length);
        
    $dm->setr('custom1'$custom1);
        
    $dm->setr('custom2'$custom2);
        
    $dm->setr('custom3'$custom3);
        
    $dm->setr('custom4'$custom4);
        
    $dm->setr('custom5'$custom5);
        
    $dm->setr('custom6'$custom6);
        
    $dm->setr('custom7'$custom7);
        
    $dm->setr('custom8'$custom8);
        
    $dm->setr('custom9'$custom9);
        
    $dm->setr('state'$visible);
        
    $dm->pre_save();
        
    $mediaID $dm->save();

        if (
    $thumbnail)
        {
            
    build_thumbnail($thumbnail$mediaID);
        }

        if (
    $taglist)
        {
            
    build_tags($taglist);
            
    build_tags_content($taglist,$mediaID);
            
    build_tags_cache($mediaID);
        }

        
    $media $vbulletin->db->query_first("
            SELECT media.*, media_service.*, media_category.*
            FROM " 
    TABLE_PREFIX "media AS media
            LEFT JOIN " 
    TABLE_PREFIX "media_service AS media_service ON(media_service.serviceID = media.serviceID)
            LEFT JOIN " 
    TABLE_PREFIX "media_category AS media_category ON(media_category.categoryID = media.categoryID)
            WHERE mediaID = '"
    .$mediaID."'
        "
    );

        if ((
    $forum fetch_foruminfo($vbulletin->options['media_submit_forum'])) && ($newthread == "newthread"))
        {
            if (
    $media['length'] == 0)
            {
                
    $media['length'] = "???";
            }
            else
            {
                
    $duration $media['length'];
                
    $minutes floor($duration 60);
                
    $seconds $duration 60;
                
    $seconds str_pad($seconds2"0"STR_PAD_LEFT); 
                
    $media['length'] = "$minutes $vbphrase[media_min] $seconds $vbphrase[media_sec]";
            }

            
    $media['date'] = vbdate($vbulletin->options['dateformat'], $media['dateline']);
            
    $media['time'] = vbdate($vbulletin->options['timeformat'], $media['dateline']);
            
    $media['thumbnail'] = $vbulletin->options['bburl'].'/'.$vbulletin->options['media_thumb_dir']."/thumbs/"$media['mediaID'] .".jpg";

            
    $href['details'] = $vbulletin->options['bburl'].'/'.construct_href_details($media);
            
    $href['category'] = $vbulletin->options['bburl'].'/'.construct_href_category($media);
            
    $href['user'] = $vbulletin->options['bburl'].'/'.construct_href_user($media);

            
    $tags explode(",",$media['tagcache']);
            foreach (
    $tags as $tagtemp)
            {
                
    $tag['tagText'] = $tagtemp;
                
    $tag['href'] = $vbulletin->options['bburl'].'/'.construct_href_tag($tag);

                
    $media['tags'][] = "[URL=$tag[href]]$tag[tagText][/URL]";
            }
            
    $media['tags'] = implode(", "$media['tags']);

            eval(
    "\$title = \"$vbphrase[media_newthread_title]\";");
            eval(
    "\$pagetext = \"$vbphrase[media_newthread_pagetext]\";");

            
    $threadman =& datamanager_init('Thread_FirstPost'$vbulletinERRTYPE_STANDARD'threadpost');
            
    $threadman->setr_info('user'$vbulletin->userinfo);
            
    $threadman->set_info('forum'$forum);
            
    $threadman->set_info('skip_moderator_email'true);
            
    $threadman->set_info('skip_floodcheck'true);
            
    $threadman->set_info('skip_charcount'true);
            
    $threadman->set_info('skip_title_error'true);
            
    $threadman->set_info('parseurl'true);
            
    $threadman->set('allowsmilie'true);
            
    $threadman->set('visible'true);
            
    $threadman->set('open'false);;
            
    $threadman->set('taglist'$media['tagcache']);
            
    $threadman->set('forumid'$vbulletin->options['media_submit_forum']);
            
    $threadman->set('userid'$vbulletin->userinfo['userid']);
            
    $threadman->set('title'$title);
            
    $threadman->set('pagetext'$pagetext);
            
    $threadman->save();
        }

        
    $vbulletin->url construct_href_details($media);
        eval(
    print_standard_redirect('media_submit_added'));
    }

    ?>
    تحياتي لك





    __________________
    زورونا في موقع الحياة للنقاشات والأسئلة والأجوبة :
    - php >> وهو لحل مشاكل php وما حولها
    - Ideas >> وهو لعرض الأفكار وتقييمها وايضا لمناقشة الأفكار

  7. #7
    عضو نشيط جدا
    تاريخ التسجيل
    Sep 2006
    المشاركات
    388


    يالغالي قم باستبدال ملف media_submit.php

    بالكود التالي [ استبدل كافة الملف ]

    كود PHP:
    <?php
    /*======================================================================*\
    || #################################################################### ||
    || # Media Library 4.0.0 (media/media_submit.php)                     # ||
    || # ---------------------------------------------------------------- # ||
    || # Copyright ©2010 Jason Axelrod. All Rights Reserved.              # ||
    || # This file may not be redistributed without permission.           # ||
    || #################################################################### ||
    \*======================================================================*/

    if (!$perms['submit'])
    {
        
    print_no_permission();
    }

    if (
    $do == "submit")
    {
        
    $vbulletin->input->clean_array_gpc('p', array(
            
    'source'    => TYPE_STR,
            
    'category'    => TYPE_UINT,
        ));

        
    $source $vbulletin->GPC['source'];
        
    $categoryID $vbulletin->GPC_exists['category'] ? $vbulletin->GPC['category'] : $cid;
        
    $catselect construct_cat_bits($categoryID);

        if (
    $source) { $feed construct_feed_data($source); }

        require_once(
    DIR '/includes/functions_editor.php');
        
    $editorid construct_edit_toolbar($feed['description'],0,'nonforum',1,1,0,'fe');

        
    $navbits[''] = $vbphrase['media_submit'];

        
    $forum fetch_foruminfo($vbulletin->options['media_submit_forum']);

        
    $templater vB_Template::create('8WR_media_submit');
            
    $templater->register('categoryID'$categoryID);
            
    $templater->register('catselect'$catselect);
            
    $templater->register('feed'$feed);
            
    $templater->register('editorid'$editorid);
            
    $templater->register('messagearea'$messagearea);
            
    $templater->register('source'$source);
            
    $templater->register('forum'$forum);
        
    $mediaHTML $templater->render();
    }

    if (
    $do == "submit_feed")
    {
        
    $vbulletin->input->clean_array_gpc('p', array(
            
    'source'    => TYPE_STR,
        ));

        
    $source $vbulletin->GPC['source'];

        
    $feed construct_feed_data($source);

        
    $xml = new vB_AJAX_XML_Builder($vbulletin'text/xml');
        
    $xml->add_group('response');
        
    $xml->add_tag('thumbnail'$feed['thumbnail']);
        
    $xml->add_tag('title'$feed['title']);
        
    $xml->add_tag('description'$feed['description']);
        
    $xml->add_tag('taglist'$feed['taglist']);
        
    $xml->add_tag('minutes'$feed['minutes']);
        
    $xml->add_tag('seconds'$feed['seconds']);
        
    $xml->add_tag('embed'$feed['embed']);
        
    $xml->add_tag('source'$feed['source']);
        
    $xml->add_tag('serviceID'$feed['serviceID']);
        
    $xml->add_tag('serviceVAL'$feed['serviceVAL']);
        
    $xml->add_tag('serviceVAL2'$feed['serviceVAL2']);
        
    $xml->close_group();
        
    $xml->print_xml();
    }

    if (
    $do == "submit_data")
    {
        
    $vbulletin->input->clean_array_gpc('p', array(
            
    'category'        => TYPE_UINT,
            
    'serviceID'        => TYPE_UINT,
            
    'serviceVAL'    => TYPE_STR,
            
    'serviceVAL2'    => TYPE_STR,
            
    'title'            => TYPE_STR,
            
    'message'        => TYPE_STR,
            
    'minutes'        => TYPE_UINT,
            
    'seconds'        => TYPE_UINT,
            
    'custom1'        => TYPE_STR,
            
    'custom2'        => TYPE_STR,
            
    'custom3'        => TYPE_STR,
            
    'custom4'        => TYPE_STR,
            
    'custom5'        => TYPE_STR,
            
    'custom6'        => TYPE_STR,
            
    'custom7'        => TYPE_STR,
            
    'custom8'        => TYPE_STR,
            
    'custom9'        => TYPE_STR,
            
    'source'        => TYPE_STR,
            
    'thumbnail'        => TYPE_STR,
            
    'taglist'        => TYPE_NOHTML,
            
    'newthread'        => TYPE_STR,
            
    'wysiwyg'        => TYPE_BOOL,
        ));

        
    $categoryID $vbulletin->GPC['category'];
        
    $serviceID $vbulletin->GPC['serviceID'];
        
    $serviceVAL $vbulletin->GPC['serviceVAL'];
        
    $serviceVAL2 $vbulletin->GPC['serviceVAL2'];
        
    $title $vbulletin->GPC['title'];
        
    $description $vbulletin->GPC['message'];
        
    $minutes $vbulletin->GPC['minutes'] * 60;
        
    $seconds $vbulletin->GPC['seconds'];
        
    $length $minutes $seconds;
        
    $custom1 $vbulletin->GPC['custom1'];
        
    $custom2 $vbulletin->GPC['custom2'];
        
    $custom3 $vbulletin->GPC['custom3'];
        
    $custom4 $vbulletin->GPC['custom4'];
        
    $custom5 $vbulletin->GPC['custom5'];
        
    $custom6 $vbulletin->GPC['custom6'];
        
    $custom7 $vbulletin->GPC['custom7'];
        
    $custom8 $vbulletin->GPC['custom8'];
        
    $custom9 $vbulletin->GPC['custom9'];
        
    $visible "visible";

        
    $thumbnail $vbulletin->GPC['thumbnail'];
        
    $taglist $vbulletin->GPC['taglist'];
        
    $newthread $vbulletin->GPC['newthread'];
        
    $wysiwig $vbulletin->GPC['wysiwyg'];

        if (
    $wysiwyg)
        {
            require_once(
    DIR '/includes/functions_wysiwyg.php');
            
    $description convert_wysiwyg_html_to_bbcode($descriptionfalse);
        }

        
    $dm =& datamanager_init('Media'$vbulletin);
        
    $dm->setr('categoryID'$categoryID);
        
    $dm->setr('title'$title);
        
    $dm->setr('description'$description);
        
    $dm->setr('length'$length);
        
    $dm->setr('custom1'$custom1);
        
    $dm->setr('custom2'$custom2);
        
    $dm->setr('custom3'$custom3);
        
    $dm->setr('custom4'$custom4);
        
    $dm->setr('custom5'$custom5);
        
    $dm->setr('custom6'$custom6);
        
    $dm->setr('custom7'$custom7);
        
    $dm->setr('custom8'$custom8);
        
    $dm->setr('custom9'$custom9);
        
    $dm->setr('state'$visible);
        
    $dm->pre_save();
        
    $mediaID $dm->save();

        if (
    $thumbnail)
        {
            
    build_thumbnail($thumbnail$mediaID);
        }

        if (
    $taglist)
        {
            
    build_tags($taglist);
            
    build_tags_content($taglist,$mediaID);
            
    build_tags_cache($mediaID);
        }

        
    $media $vbulletin->db->query_first("
            SELECT media.*, media_service.*, media_category.*
            FROM " 
    TABLE_PREFIX "media AS media
            LEFT JOIN " 
    TABLE_PREFIX "media_service AS media_service ON(media_service.serviceID = media.serviceID)
            LEFT JOIN " 
    TABLE_PREFIX "media_category AS media_category ON(media_category.categoryID = media.categoryID)
            WHERE mediaID = '"
    .$mediaID."'
        "
    );

        if ((
    $forum fetch_foruminfo($vbulletin->options['media_submit_forum'])) && ($newthread == "newthread"))
        {
            if (
    $media['length'] == 0)
            {
                
    $media['length'] = "???";
            }
            else
            {
                
    $duration $media['length'];
                
    $minutes floor($duration 60);
                
    $seconds $duration 60;
                
    $seconds str_pad($seconds2"0"STR_PAD_LEFT); 
                
    $media['length'] = "$minutes $vbphrase[media_min] $seconds $vbphrase[media_sec]";
            }

            
    $media['date'] = vbdate($vbulletin->options['dateformat'], $media['dateline']);
            
    $media['time'] = vbdate($vbulletin->options['timeformat'], $media['dateline']);
            
    $media['thumbnail'] = $vbulletin->options['bburl'].'/'.$vbulletin->options['media_thumb_dir']."/thumbs/"$media['mediaID'] .".jpg";

            
    $href['details'] = $vbulletin->options['bburl'].'/'.construct_href_details($media);
            
    $href['category'] = $vbulletin->options['bburl'].'/'.construct_href_category($media);
            
    $href['user'] = $vbulletin->options['bburl'].'/'.construct_href_user($media);

            
    $tags explode(",",$media['tagcache']);
            foreach (
    $tags as $tagtemp)
            {
                
    $tag['tagText'] = $tagtemp;
                
    $tag['href'] = $vbulletin->options['bburl'].'/'.construct_href_tag($tag);

                
    $media['tags'][] = "[URL=$tag[href]]$tag[tagText][/URL]";
            }
            
    $media['tags'] = implode(", "$media['tags']);

            eval(
    "\$title = \"$vbphrase[media_newthread_title]\";");
            eval(
    "\$pagetext = \"$vbphrase[media_newthread_pagetext]\";");

            
    $threadman =& datamanager_init('Thread_FirstPost'$vbulletinERRTYPE_STANDARD'threadpost');
            
    $threadman->setr_info('user'$vbulletin->userinfo);
            
    $threadman->set_info('forum'$forum);
            
    $threadman->set_info('skip_moderator_email'true);
            
    $threadman->set_info('skip_floodcheck'true);
            
    $threadman->set_info('skip_charcount'true);
            
    $threadman->set_info('skip_title_error'true);
            
    $threadman->set_info('parseurl'true);
            
    $threadman->set('allowsmilie'true);
            
    $threadman->set('visible'true);
            
    $threadman->set('open'false);;
            
    $threadman->set('taglist'$media['tagcache']);
            
    $threadman->set('forumid'$vbulletin->options['media_submit_forum']);
            
    $threadman->set('userid'$vbulletin->userinfo['userid']);
            
    $threadman->set('title'$title);
            
    $threadman->set('pagetext'$pagetext);
            
    $threadman->save();
        }

        
    $vbulletin->url construct_href_details($media);
        eval(
    print_standard_redirect('media_submit_added'));
    }

    ?>
    تحياتي لك
    مثل الشي عزيزي

    رسالة ادارية:
    ((الخانة المطلوبة serviceID فارغ أو لم تقم بملء الخانة))






  8. #8


    كود PHP:
    <?php
    /*======================================================================*\
    || #################################################################### ||
    || # Media Library 4.0.0 (media/media_submit.php)                     # ||
    || # ---------------------------------------------------------------- # ||
    || # Copyright ©2010 Jason Axelrod. All Rights Reserved.              # ||
    || # This file may not be redistributed without permission.           # ||
    || #################################################################### ||
    \*======================================================================*/

    if (!$perms['submit'])
    {
        
    print_no_permission();
    }

    if (
    $do == "submit")
    {
        
    $vbulletin->input->clean_array_gpc('p', array(
            
    'source'    => TYPE_STR,
            
    'category'    => TYPE_UINT,
        ));

        
    $source $vbulletin->GPC['source'];
        
    $categoryID $vbulletin->GPC_exists['category'] ? $vbulletin->GPC['category'] : $cid;
        
    $catselect construct_cat_bits($categoryID);

        if (
    $source) { $feed construct_feed_data($source); }

        require_once(
    DIR '/includes/functions_editor.php');
        
    $editorid construct_edit_toolbar($feed['description'],0,'nonforum',1,1,0,'fe');

        
    $navbits[''] = $vbphrase['media_submit'];

        
    $forum fetch_foruminfo($vbulletin->options['media_submit_forum']);

        
    $templater vB_Template::create('8WR_media_submit');
            
    $templater->register('categoryID'$categoryID);
            
    $templater->register('catselect'$catselect);
            
    $templater->register('feed'$feed);
            
    $templater->register('editorid'$editorid);
            
    $templater->register('messagearea'$messagearea);
            
    $templater->register('source'$source);
            
    $templater->register('forum'$forum);
        
    $mediaHTML $templater->render();
    }

    if (
    $do == "submit_feed")
    {
        
    $vbulletin->input->clean_array_gpc('p', array(
            
    'source'    => TYPE_STR,
        ));

        
    $source $vbulletin->GPC['source'];

        
    $feed construct_feed_data($source);

        
    $xml = new vB_AJAX_XML_Builder($vbulletin'text/xml');
        
    $xml->add_group('response');
        
    $xml->add_tag('thumbnail'$feed['thumbnail']);
        
    $xml->add_tag('title'$feed['title']);
        
    $xml->add_tag('description'$feed['description']);
        
    $xml->add_tag('taglist'$feed['taglist']);
        
    $xml->add_tag('minutes'$feed['minutes']);
        
    $xml->add_tag('seconds'$feed['seconds']);
        
    $xml->add_tag('embed'$feed['embed']);
        
    $xml->add_tag('source'$feed['source']);
        
    $xml->close_group();
        
    $xml->print_xml();
    }

    if (
    $do == "submit_data")
    {
        
    $vbulletin->input->clean_array_gpc('p', array(
            
    'category'        => TYPE_UINT,
            
    'title'            => TYPE_STR,
            
    'message'        => TYPE_STR,
            
    'minutes'        => TYPE_UINT,
            
    'seconds'        => TYPE_UINT,
            
    'custom1'        => TYPE_STR,
            
    'custom2'        => TYPE_STR,
            
    'custom3'        => TYPE_STR,
            
    'custom4'        => TYPE_STR,
            
    'custom5'        => TYPE_STR,
            
    'custom6'        => TYPE_STR,
            
    'custom7'        => TYPE_STR,
            
    'custom8'        => TYPE_STR,
            
    'custom9'        => TYPE_STR,
            
    'source'        => TYPE_STR,
            
    'thumbnail'        => TYPE_STR,
            
    'taglist'        => TYPE_NOHTML,
            
    'newthread'        => TYPE_STR,
            
    'wysiwyg'        => TYPE_BOOL,
        ));

        
    $categoryID $vbulletin->GPC['category'];
        
    $title $vbulletin->GPC['title'];
        
    $description $vbulletin->GPC['message'];
        
    $minutes $vbulletin->GPC['minutes'] * 60;
        
    $seconds $vbulletin->GPC['seconds'];
        
    $length $minutes $seconds;
        
    $custom1 $vbulletin->GPC['custom1'];
        
    $custom2 $vbulletin->GPC['custom2'];
        
    $custom3 $vbulletin->GPC['custom3'];
        
    $custom4 $vbulletin->GPC['custom4'];
        
    $custom5 $vbulletin->GPC['custom5'];
        
    $custom6 $vbulletin->GPC['custom6'];
        
    $custom7 $vbulletin->GPC['custom7'];
        
    $custom8 $vbulletin->GPC['custom8'];
        
    $custom9 $vbulletin->GPC['custom9'];
        
    $visible "visible";

        
    $thumbnail $vbulletin->GPC['thumbnail'];
        
    $taglist $vbulletin->GPC['taglist'];
        
    $newthread $vbulletin->GPC['newthread'];
        
    $wysiwig $vbulletin->GPC['wysiwyg'];

        if (
    $wysiwyg)
        {
            require_once(
    DIR '/includes/functions_wysiwyg.php');
            
    $description convert_wysiwyg_html_to_bbcode($descriptionfalse);
        }

        
    $dm =& datamanager_init('Media'$vbulletin);
        
    $dm->setr('categoryID'$categoryID);
        
    $dm->setr('title'$title);
        
    $dm->setr('description'$description);
        
    $dm->setr('length'$length);
        
    $dm->setr('custom1'$custom1);
        
    $dm->setr('custom2'$custom2);
        
    $dm->setr('custom3'$custom3);
        
    $dm->setr('custom4'$custom4);
        
    $dm->setr('custom5'$custom5);
        
    $dm->setr('custom6'$custom6);
        
    $dm->setr('custom7'$custom7);
        
    $dm->setr('custom8'$custom8);
        
    $dm->setr('custom9'$custom9);
        
    $dm->setr('state'$visible);
        
    $dm->pre_save();
        
    $mediaID $dm->save();

        if (
    $thumbnail)
        {
            
    build_thumbnail($thumbnail$mediaID);
        }

        if (
    $taglist)
        {
            
    build_tags($taglist);
            
    build_tags_content($taglist,$mediaID);
            
    build_tags_cache($mediaID);
        }

        
    $media $vbulletin->db->query_first("
            SELECT media.*, media_service.*, media_category.*
            FROM " 
    TABLE_PREFIX "media AS media
            LEFT JOIN " 
    TABLE_PREFIX "media_service AS media_service ON(media_service.serviceID = media.serviceID)
            LEFT JOIN " 
    TABLE_PREFIX "media_category AS media_category ON(media_category.categoryID = media.categoryID)
            WHERE mediaID = '"
    .$mediaID."'
        "
    );

        if ((
    $forum fetch_foruminfo($vbulletin->options['media_submit_forum'])) && ($newthread == "newthread"))
        {
            if (
    $media['length'] == 0)
            {
                
    $media['length'] = "???";
            }
            else
            {
                
    $duration $media['length'];
                
    $minutes floor($duration 60);
                
    $seconds $duration 60;
                
    $seconds str_pad($seconds2"0"STR_PAD_LEFT); 
                
    $media['length'] = "$minutes $vbphrase[media_min] $seconds $vbphrase[media_sec]";
            }

            
    $media['date'] = vbdate($vbulletin->options['dateformat'], $media['dateline']);
            
    $media['time'] = vbdate($vbulletin->options['timeformat'], $media['dateline']);
            
    $media['thumbnail'] = $vbulletin->options['bburl'].'/'.$vbulletin->options['media_thumb_dir']."/thumbs/"$media['mediaID'] .".jpg";

            
    $href['details'] = $vbulletin->options['bburl'].'/'.construct_href_details($media);
            
    $href['category'] = $vbulletin->options['bburl'].'/'.construct_href_category($media);
            
    $href['user'] = $vbulletin->options['bburl'].'/'.construct_href_user($media);

            
    $tags explode(",",$media['tagcache']);
            foreach (
    $tags as $tagtemp)
            {
                
    $tag['tagText'] = $tagtemp;
                
    $tag['href'] = $vbulletin->options['bburl'].'/'.construct_href_tag($tag);

                
    $media['tags'][] = "[url=$tag[href]]$tag[tagText][/url]";
            }
            
    $media['tags'] = implode(", "$media['tags']);

            eval(
    "\$title = \"$vbphrase[media_newthread_title]\";");
            eval(
    "\$pagetext = \"$vbphrase[media_newthread_pagetext]\";");

            
    $threadman =& datamanager_init('Thread_FirstPost'$vbulletinERRTYPE_STANDARD'threadpost');
            
    $threadman->setr_info('user'$vbulletin->userinfo);
            
    $threadman->set_info('forum'$forum);
            
    $threadman->set_info('skip_moderator_email'true);
            
    $threadman->set_info('skip_floodcheck'true);
            
    $threadman->set_info('skip_charcount'true);
            
    $threadman->set_info('skip_title_error'true);
            
    $threadman->set_info('parseurl'true);
            
    $threadman->set('allowsmilie'true);
            
    $threadman->set('visible'true);
            
    $threadman->set('open'false);;
            
    $threadman->set('taglist'$media['tagcache']);
            
    $threadman->set('forumid'$vbulletin->options['media_submit_forum']);
            
    $threadman->set('userid'$vbulletin->userinfo['userid']);
            
    $threadman->set('title'$title);
            
    $threadman->set('pagetext'$pagetext);
            
    $threadman->save();
        }

        
    $vbulletin->url construct_href_details($media);
        eval(
    print_standard_redirect('media_submit_added'));
    }

    ?>






    __________________
    زورونا في موقع الحياة للنقاشات والأسئلة والأجوبة :
    - php >> وهو لحل مشاكل php وما حولها
    - Ideas >> وهو لعرض الأفكار وتقييمها وايضا لمناقشة الأفكار

  9. #9
    عضو نشيط جدا
    تاريخ التسجيل
    Sep 2006
    المشاركات
    388


    لم يتغير شي اخوي عبدالله .. مثل الرسالة










المواضيع المتشابهه

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

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

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