إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...

انضم الينا
استراحات زايد الصفحة الرئيسية

  #1  
قديم 06-21-2010, 05:30 AM
عضو ماسي
بيانات محروم.كوم
 رقم العضوية : 503
 تاريخ التسجيل : Dec 2007
الجنس : female
علم الدوله :
 المشاركات : 2,100,669
عدد الـنقاط :3341
 تقييم المستوى : 2141

I am looking to modify a plugin that posts a new thread when a new member registers on our forums. I am placing this new thread in a separate section so that we can comment on these users before approving them for the forum.

In this thread I want to include some information regarding fields they filled out during registration so I tried to do this:

Code:
$usercardata = $db->query_first("
SELECT u.field5
FROM " . TABLE_PREFIX . "useractivation AS ua
LEFT JOIN " . TABLE_PREFIX . "userfield AS u USING (userid)
WHERE ua.activationid = '" . $vbulletin->db->escape_string($vbulletin->GPC['i']) . "'
AND ua.emailchange = 0
");

$usercar = $usercardata['field5'];
$pagetext = str_replace('$usercar',htmlspecialchars_uni($vbull etin->userinfo['field5']), $pagetext);

The above query (modified from the query below) returns a blank value.

The code that the plugin creator users to grab the username is:
Code:
$userdata = $db->query_first("
SELECT u.username
FROM " . TABLE_PREFIX . "useractivation AS ua
LEFT JOIN " . TABLE_PREFIX . "user AS u USING (userid)
WHERE ua.activationid = '" . $vbulletin->db->escape_string($vbulletin->GPC['i']) . "'
AND ua.emailchange = 0
");

$username = $userdata['username'];
$pagetext = str_replace('$username',htmlspecialchars_uni($vbul letin->userinfo['username']), $pagetext);
Any idea what I am doing wrong or what needs to be fixed in order to do this correctly? Is there a better way to include User Registration fields IN post content?

Thanks in advance.
__DEFINE_LIKE_SHARE__
رد مع اقتباس
إضافة رد

مواقع النشر (المفضلة)


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

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة
Trackbacks are متاحة
Pingbacks are متاحة
Refbacks are متاحة



الساعة الآن 07:23 AM


Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir

RSS RSS 2.0 XML MAP HTML