vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBadvanced CMPS (https://vborg.vbsupport.ru/forumdisplay.php?f=101)
-   -   Recent Zoints Blog Entries Module (https://vborg.vbsupport.ru/showthread.php?t=143004)

itdevil 03-24-2007 11:37 AM

Recent Zoints Blog Entries Module
 
Hi, I am trying to add "Recent Zoints Blog Entries" using the beta hack given at dev.zoints.com but due to some reason it is not working. Even the module is active it showing me nothing regrading blog. Can anyone help me in sorting it out.

Thank you


modules/zoints_newblogs.php

PHP Code:

<?php
// ++=========================================================================++


if (@require_once('/home/xxxxx/xxxxstuf/xxxforums.com/z/includes/localsettings.php'))
{
    if (
$config['mod rewrite'])
    {
        
$zlinkstyle 'rewrite';
    }
    else
    {
        
$zlinkstyle 'normal';
    }

    
$zlink mysql_connect($config['master_server']['host'], $config['master_server']['user'], $config['master_server']['pass']);
    
mysql_select_db($config['server_database']);
    
    
$getentries mysql_query("
        SELECT entry.*, user.userid, user.usertoken, user.avatar
        FROM " 
$config['table prefix'] . "blog_entry AS entry
        LEFT JOIN " 
$config['table prefix'] . "user AS user ON (entry.masterid = user.userid)
        WHERE groups = ''
        ORDER BY dateline DESC
        LIMIT 5
    "
$zlink);
    while (
$entry mysql_fetch_array($getentries))
    {
        
exec_switch_bg();

        
$entry['zurl'] = $config['site url'] . sprintf($config['profile'][$zlinkstyle]['url'], $entry['usertoken']);
        
$entry['entryurl'] = $config['site url'] . sprintf($config['profile'][$zlinkstyle]['path'], $entry['usertoken'], 'blog') . ($zlinkstyle == 'rewrite' '?' '&amp;') . 'cmd=viewentry&amp;entryid=' $entry['entryid'];

        if (
$entry['avatar'])
        {
            
$entry['avatar_path'] = $config['site url'] . 'user/' implode('/'array_reverse(preg_split("##"$entry['userid'], -1PREG_SPLIT_NO_EMPTY))) . '/avatar.' $entry['avatar'];
        }
    
        
$entry['dateline'] = vbdate($vbulletin->options['dateformat'] . ' ' $vbulletin->options['timeformat'], $entry['dateline']);

        
// Strip characters and add "read more"
        
if ($mod_options['portal_zoints_blog_maxchars'] AND strlen($entry['comment_parsed']) > $mod_options['portal_zoints_blog_maxchars'])
        {
            
$entry['comment_parsed'] = substr($entry['comment_parsed'], 0strrpos(substr($entry['comment_parsed'], 0$mod_options['portal_zoints_blog_maxchars']), ' '));

            
$entry['comment_parsed'] = check_string_html($entry['comment_parsed'], '<div''</div>');
            
$entry['comment_parsed'] = check_string_html($entry['comment_parsed'], '<td''</td>');
            
$entry['comment_parsed'] = check_string_html($entry['comment_parsed'], '<tr''</tr>');
            
$entry['comment_parsed'] = check_string_html($entry['comment_parsed'], '<table''</table>');
            
$entry['comment_parsed'] = check_string_html($entry['comment_parsed'], '<table''</table>');

            
$entry['comment_parsed'] .= '... [<a href="' $entry['entryurl'] . '">Read More</a>]';
        }


        eval(
'$home[$mods[modid]][content] .= "' fetch_template('adv_portal_zoints_newblog') . '";');
    }
    
    
mysql_free_result($getentries);
    
}

?>


Template: adv_portal_zoints_newblog
Code:

<tr>
<td class="thead"><a href="$entry[entryurl]">$entry[title]</a></td>
</tr>
<tr>
<td class="$bgclass">

<div style="padding: 4px">Posted on $entry[dateline] by <a href="$entry[zurl]">$entry[username]</a></div>

<if condition="$entry['avatar']">
    <a href="$entry[zurl]"><img align="left" src="$entry[avatar_path]" alt="$entry[username]'s Avatar" border="0" /></a>
</if>

$entry[comment_parsed]

</td>
</tr>


How can i make it work on vB 3.6.5 with vBA CMPS 2.2.1.

Thank You!


All times are GMT. The time now is 10:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01089 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete