Adk Portal

Started by lucas-ruroken, March 06, 2010, 06:19:55 AM

Previous topic - Next topic

lucas-ruroken

Quote from: nightyyx on August 16, 2010, 03:38:24 PM
attached also to one of my posts the subs-adblocks.php file but dint change anything on block with topics in main portal:)
??? I don't understand you
Adk Portal 3.1 is coming....

Design your universe!

nightyyx

You had told me that if i attach this file i can have on adk portal "TOPIC" block a icon of "new" when someone post a unread post for me at a topic.
Or i understood wrong?
sorry a bit for my bad english:)

Also i want to know if  the adk gives this possibility
I want also to add at my forum in main portal a catalogue.
I want a table that you can set and have a photo and title of 10 or 20 night clubs that eatch member of forum can click on the name of the club and write a critic.A describtion about how good place was. Next to description a vote mode that the member can put a vote about the parking for club , the place inside etc.

^HeRaCLeS^

^HeRaCLeS^
*¤×• Ni te molestes en enviarme un Mp porque el soporte lo doy solo por el foro •×¤*


SMFPersonal

nightyyx

what you mean? :)
more details about the catalogue that i was speaking before or you saying that this that i want is too difucult?

^HeRaCLeS^

^HeRaCLeS^
*¤×• Ni te molestes en enviarme un Mp porque el soporte lo doy solo por el foro •×¤*


SMFPersonal

nightyyx

anyway at the moment i need mostly to can write in greek characters in the news block of my adk portal witout showing the letters with strange characters:)

lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

Rain Forest

I have installed the !Karma Description Mod. Any Idea how I can set this up at the Portal of ADK? As a block at the left side...

I am using SMF2.0 RC3

lucas-ruroken

I don't understandyou...

You can add a block of...?
Adk Portal 3.1 is coming....

Design your universe!

Rain Forest

Quote from: lucas-ruroken on August 23, 2010, 01:45:33 PM
I don't understandyou...

You can add a block of...?

If I want to make a block at the left side, I have to 'create block html' or 'create block php'. What should I enter in the 'Create Block PHP' If I want to make a block of top 5 karma users with avatar?

lucas-ruroken


<?php
global $context$scripturl$txt$smcFunc$boardurl$adkportal$modSettings;

if(empty($limit))
$limit $adkportal['top_poster'];

$sql $smcFunc['db_query']('','
SELECT mem.id_member, mem.real_name, mem.avatar, mem.karma_good AS posts,
mg.online_color,
IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
FROM {db_prefix}members AS mem
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = IF(mem.id_group = 0, mem.id_post_group, mem.id_group))
ORDER BY mem.karma_good DESC
LIMIT {int:limit}'
,
array(
'limit' => $limit,
)
);

echo'<table style="width: 100%;">';

$context['the_array'] = array();

//Height and width avatar
$width 50;
$height 50;

while($row $smcFunc['db_fetch_assoc']($sql))
$context['the_array'][] = array(
'id' => $row['id_member'],
'name' => $row['real_name'],
'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > '<img width="'.$width.'" height="'.$height.'" src="' . (empty($row['attachment_type']) ? $scripturl '?action=dlattach;attach=' $row['id_attach'] . ';type=avatar' $modSettings['custom_avatar_url'] . '/' $row['filename']) . '" alt="" class="avatar" border="0" />' '') : (stristr($row['avatar'], 'http://') ? '<img width="'.$width.'" height="'.$height.'"src="' $row['avatar'] . '" alt="" class="avatar" border="0" />' '<img width="'.$width.'" height="'.$height.'"src="' $modSettings['avatar_url'] . '/' $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" class="avatar" border="0" />'),
'color' => $row['online_color'],
'posts' => $row['posts'],
);


foreach($context['the_array'] AS $adkTopPoster)
{
$id_member $adkTopPoster['id'];

if(empty($adkTopPoster['avatar']))
$avatar '<img src="'.$boardurl.'/adkportal/images/noavatar.jpg" alt="" class="adk_avatar" />';
else
$avatar $adkTopPoster['avatar'];

$color_online $adkTopPoster['color'];

echo'
<tr>
<td  width="21">
'
,$avatar,'
</td>
<td valign="middle">
<a href="'
.$scripturl.'?action=profile;u='.$id_member.'" title="'.$adkTopPoster['name'].'" style="color: '.$color_online.'; font-weight: bold;">
'
.substr($adkTopPoster['name'],0,13).'
</a>
<br />
<span class="smalltext"><strong>'
.$txt['adk_posts'].'</strong>: '.$adkTopPoster['posts'].'</span>
</td>
</tr>'
;
}

echo'</table>';


;)
Adk Portal 3.1 is coming....

Design your universe!

Rain Forest

Quote from: lucas-ruroken on August 23, 2010, 05:15:50 PM

<?php
global $context$scripturl$txt$smcFunc$boardurl$adkportal$modSettings;

if(empty($limit))
$limit $adkportal['top_poster'];

$sql $smcFunc['db_query']('','
SELECT mem.id_member, mem.real_name, mem.avatar, mem.karma_good AS posts,
mg.online_color,
IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
FROM {db_prefix}members AS mem
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = IF(mem.id_group = 0, mem.id_post_group, mem.id_group))
ORDER BY mem.karma_good DESC
LIMIT {int:limit}'
,
array(
'limit' => $limit,
)
);

echo'<table style="width: 100%;">';

$context['the_array'] = array();

//Height and width avatar
$width 50;
$height 50;

while($row $smcFunc['db_fetch_assoc']($sql))
$context['the_array'][] = array(
'id' => $row['id_member'],
'name' => $row['real_name'],
'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > '<img width="'.$width.'" height="'.$height.'" src="' . (empty($row['attachment_type']) ? $scripturl '?action=dlattach;attach=' $row['id_attach'] . ';type=avatar' $modSettings['custom_avatar_url'] . '/' $row['filename']) . '" alt="" class="avatar" border="0" />' '') : (stristr($row['avatar'], 'http://') ? '<img width="'.$width.'" height="'.$height.'"src="' $row['avatar'] . '" alt="" class="avatar" border="0" />' '<img width="'.$width.'" height="'.$height.'"src="' $modSettings['avatar_url'] . '/' $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" class="avatar" border="0" />'),
'color' => $row['online_color'],
'posts' => $row['posts'],
);


foreach($context['the_array'] AS $adkTopPoster)
{
$id_member $adkTopPoster['id'];

if(empty($adkTopPoster['avatar']))
$avatar '<img src="'.$boardurl.'/adkportal/images/noavatar.jpg" alt="" class="adk_avatar" />';
else
$avatar $adkTopPoster['avatar'];

$color_online $adkTopPoster['color'];

echo'
<tr>
<td  width="21">
'
,$avatar,'
</td>
<td valign="middle">
<a href="'
.$scripturl.'?action=profile;u='.$id_member.'" title="'.$adkTopPoster['name'].'" style="color: '.$color_online.'; font-weight: bold;">
'
.substr($adkTopPoster['name'],0,13).'
</a>
<br />
<span class="smalltext"><strong>'
.$txt['adk_posts'].'</strong>: '.$adkTopPoster['posts'].'</span>
</td>
</tr>'
;
}

echo'</table>';


;)

Thanks buddy. But after the 'save' I got this:

The database value you're trying to insert does not exist: limit

lucas-ruroken

replace
if(empty($limit))
      $limit = $adkportal['top_poster'];

with
$limit = 10;
Adk Portal 3.1 is coming....

Design your universe!

Rain Forest

Quote from: lucas-ruroken on August 24, 2010, 06:12:42 PM
replace
if(empty($limit))
      $limit = $adkportal['top_poster'];

with
$limit = 10;

Hmm, still getting this error...

The database value you're trying to insert does not exist: limit

lucas-ruroken

I tested this block...

Now, It work:


<?php
global $context$scripturl$txt$smcFunc$boardurl$adkportal$modSettings;
   
   if(empty(
$limit))
      
$limit $adkportal['top_poster'];
      
   
$sql $smcFunc['db_query']('','
      SELECT mem.id_member, mem.real_name, mem.avatar, mem.karma_good AS posts,
      mg.online_color,
         IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
      FROM {db_prefix}members AS mem
      LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
      LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = IF(mem.id_group = 0, mem.id_post_group, mem.id_group))
      ORDER BY mem.karma_good DESC
      LIMIT 5'
   
);
   
   echo
'<table style="width: 100%;">';
   
   
$context['the_array'] = array();
   
   
//Height and width avatar
   
$width 50;
   
$height 50;
   
   while(
$row $smcFunc['db_fetch_assoc']($sql))
      
$context['the_array'][] = array(
         
'id' => $row['id_member'],
         
'name' => $row['real_name'],
         
'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > '<img width="'.$width.'" height="'.$height.'" src="' . (empty($row['attachment_type']) ? $scripturl '?action=dlattach;attach=' $row['id_attach'] . ';type=avatar' $modSettings['custom_avatar_url'] . '/' $row['filename']) . '" alt="" class="avatar" border="0" />' '') : (stristr($row['avatar'], 'http://') ? '<img width="'.$width.'" height="'.$height.'"src="' $row['avatar'] . '" alt="" class="avatar" border="0" />' '<img width="'.$width.'" height="'.$height.'"src="' $modSettings['avatar_url'] . '/' $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" class="avatar" border="0" />'),
         
'color' => $row['online_color'],
         
'posts' => $row['posts'],
      );
   
   
   foreach(
$context['the_array'] AS $adkTopPoster)
   {
      
$id_member $adkTopPoster['id'];
      
      if(empty(
$adkTopPoster['avatar']))
         
$avatar '<img src="'.$boardurl.'/adkportal/images/noavatar.jpg" alt="" class="adk_avatar" />';
      else
         
$avatar $adkTopPoster['avatar'];
         
      
$color_online $adkTopPoster['color'];
      
      echo
'
         <tr>
            <td  width="21">
               '
,$avatar,'
            </td>
            <td valign="middle">
               <a href="'
.$scripturl.'?action=profile;u='.$id_member.'" title="'.$adkTopPoster['name'].'" style="color: '.$color_online.'; font-weight: bold;">
                  '
.substr($adkTopPoster['name'],0,13).'
               </a>
               <br />
               <span class="smalltext"><strong>Karma</strong>: '
.$adkTopPoster['posts'].'</span>
            </td>
         </tr>'
;
   }
      
   echo
'</table>';   
?>

Adk Portal 3.1 is coming....

Design your universe!

Leonne

Hi all, I have a problem with adk portal, I had manual install adk portal exactly, but when I run db_install_adkportal.php to install it, I receive an error message:
Parse error: syntax error, unexpected T_IF in /.../forum/Sources/Subs-adkfunction.php on line 1. Anyone can help me how to run it? Thanks alot.

lucas-ruroken

go to cpanel-->Files-->(Find Subs-adkfunction.php file) and edit it....

Open the Subs-adkfunction.php file on your pc and select all and copy.... and after that past it in your file on cpanel...

Sorry for my poor english
Adk Portal 3.1 is coming....

Design your universe!

Rain Forest

Quote from: lucas-ruroken on August 25, 2010, 07:11:03 PM
I tested this block...

Now, It work:


<?php
global $context$scripturl$txt$smcFunc$boardurl$adkportal$modSettings;
   
   if(empty(
$limit))
      
$limit $adkportal['top_poster'];
      
   
$sql $smcFunc['db_query']('','
      SELECT mem.id_member, mem.real_name, mem.avatar, mem.karma_good AS posts,
      mg.online_color,
         IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
      FROM {db_prefix}members AS mem
      LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
      LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = IF(mem.id_group = 0, mem.id_post_group, mem.id_group))
      ORDER BY mem.karma_good DESC
      LIMIT 5'
   
);
   
   echo
'<table style="width: 100%;">';
   
   
$context['the_array'] = array();
   
   
//Height and width avatar
   
$width 50;
   
$height 50;
   
   while(
$row $smcFunc['db_fetch_assoc']($sql))
      
$context['the_array'][] = array(
         
'id' => $row['id_member'],
         
'name' => $row['real_name'],
         
'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > '<img width="'.$width.'" height="'.$height.'" src="' . (empty($row['attachment_type']) ? $scripturl '?action=dlattach;attach=' $row['id_attach'] . ';type=avatar' $modSettings['custom_avatar_url'] . '/' $row['filename']) . '" alt="" class="avatar" border="0" />' '') : (stristr($row['avatar'], 'http://') ? '<img width="'.$width.'" height="'.$height.'"src="' $row['avatar'] . '" alt="" class="avatar" border="0" />' '<img width="'.$width.'" height="'.$height.'"src="' $modSettings['avatar_url'] . '/' $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" class="avatar" border="0" />'),
         
'color' => $row['online_color'],
         
'posts' => $row['posts'],
      );
   
   
   foreach(
$context['the_array'] AS $adkTopPoster)
   {
      
$id_member $adkTopPoster['id'];
      
      if(empty(
$adkTopPoster['avatar']))
         
$avatar '<img src="'.$boardurl.'/adkportal/images/noavatar.jpg" alt="" class="adk_avatar" />';
      else
         
$avatar $adkTopPoster['avatar'];
         
      
$color_online $adkTopPoster['color'];
      
      echo
'
         <tr>
            <td  width="21">
               '
,$avatar,'
            </td>
            <td valign="middle">
               <a href="'
.$scripturl.'?action=profile;u='.$id_member.'" title="'.$adkTopPoster['name'].'" style="color: '.$color_online.'; font-weight: bold;">
                  '
.substr($adkTopPoster['name'],0,13).'
               </a>
               <br />
               <span class="smalltext"><strong>Karma</strong>: '
.$adkTopPoster['posts'].'</span>
            </td>
         </tr>'
;
   }
      
   echo
'</table>';   
?>



Thank you! Can I change the height and width avatar  to 50 x 50 ?

See: http://solar-xl.nl/forum/index.php

lucas-ruroken

replace

         'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img width="'.$width.'" height="'.$height.'" src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img width="'.$width.'" height="'.$height.'"src="' . $row['avatar'] . '" alt="" class="avatar" border="0" />' : '<img width="'.$width.'" height="'.$height.'"src="' . $modSettings['avatar_url'] . '/' . $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" class="avatar" border="0" />'),


with:

         'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img width="'.$width.'" height="'.$height.'" src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="adk_avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img width="'.$width.'" height="'.$height.'"src="' . $row['avatar'] . '" alt="" class="adk_avatar" border="0" />' : '<img width="'.$width.'" height="'.$height.'"src="' . $modSettings['avatar_url'] . '/' . $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" class="adk_avatar" border="0" />'),



Why you don't upgrade to RC4?
Adk Portal 3.1 is coming....

Design your universe!

Rain Forest

Quote from: lucas-ruroken on August 26, 2010, 12:37:14 PM
replace

         'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img width="'.$width.'" height="'.$height.'" src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img width="'.$width.'" height="'.$height.'"src="' . $row['avatar'] . '" alt="" class="avatar" border="0" />' : '<img width="'.$width.'" height="'.$height.'"src="' . $modSettings['avatar_url'] . '/' . $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" class="avatar" border="0" />'),


with:

         'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img width="'.$width.'" height="'.$height.'" src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="adk_avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img width="'.$width.'" height="'.$height.'"src="' . $row['avatar'] . '" alt="" class="adk_avatar" border="0" />' : '<img width="'.$width.'" height="'.$height.'"src="' . $modSettings['avatar_url'] . '/' . $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" class="adk_avatar" border="0" />'),



Why you don't upgrade to RC4?

Because it gives me problems... Some functions are not working and are not build in well... that's why i sticked to RC3 :)

Advertisement: