vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB3 Member Album 2.0 (https://vborg.vbsupport.ru/showthread.php?t=63733)

d3nnis 04-16-2004 02:58 PM

Quote:

Originally Posted by Velocd
Review the thread. I've mentioned many a times I don't plan to build add-ons for this hack.

No multiple images, no commenting system, yadda yadda.

You are free to do so yourself.


hehe u can do the personals... i would be glad to purchase it from you (u can make it commercial! I haven seen any personals yet... to integrate into vb3)

Boofo 04-16-2004 03:00 PM

Quote:

Originally Posted by Velocd
Yep, and that actually makes more sense. Will update the install.html.

In the template album_sig_list, find:

HTML Code:

<br /><br />Last modified:<br />$user[sigdate], <font class="time">$user[sigtime]</font>
Replace it with:

HTML Code:

<if condition="$user[sigdateline]"><br /><br />Last modified:<br />$user[sigdate], <font class="time">$user[sigtime]</font></if>

Thank you, sir. That actually looks much better. ;)

Velocd 04-17-2004 04:21 AM

Quote:

The only disadvantage will be that all comments will be cut off after 40 characters because the new entry field in the user options is limited to 40 characters which was 255 characters before.
Well, the HTML input field "maxlength" attribute does little to actually restrict the data that can be passed.

The comment field in the table customprofilepic is varchar(255), meaning it can hold up to 255 characters. I only set the INPUT maxlength value to 40, as I thought that was suitable for this hack.

Both can be changed.

Pseudomizer 04-17-2004 09:24 AM

Quote:

Originally Posted by Velocd
Well, the HTML input field "maxlength" attribute does little to actually restrict the data that can be passed.

The comment field in the table customprofilepic is varchar(255), meaning it can hold up to 255 characters. I only set the INPUT maxlength value to 40, as I thought that was suitable for this hack.

Both can be changed.

Correct. My script just cuts off every character after the 40th one. So if someone needs to go beyond the 40 characters he can just uncomment this cut function and he will have all 255 characters available assuming that he changes the input field from 40 to 255.

But no one is interested in this script so far. I am fine with the 40 characters.

Cheers,

Velocd 04-17-2004 02:37 PM

If you want, I can place the script as an attachment in the first post, so people will see it more easily.

Defiantly a good incentive for people to upgrade if they currently have the old member gallery. ;)

Pseudomizer 04-20-2004 11:03 PM

Quote:

Originally Posted by Velocd
If you want, I can place the script as an attachment in the first post, so people will see it more easily.

Defiantly a good incentive for people to upgrade if they currently have the old member gallery. ;)

Hello Velocd,

sorry for the delay but i implemented some small bugfixes into this script and made it more userfriendly with screen outputs.

I have added an installation instruction into the ZIP file how to install it and how to run it. Please note that i highly recommend all users who want to use this script to backup their existing database BEFORE they run this script.

Enjoy this script.

Cheers,

Pseudomizer 04-20-2004 11:17 PM

Hello Velocd,


PLEASE DO NOT USE THE CODE BELOW!!! This code was quick and dirty and a better version with only 1 query can be found here:
https://vborg.vbsupport.ru/showpost....0&postcount=82


i just have created another add-on for your hack. What it does ? It implements a random picture on your portal ( tested with vbindex 3.0.0 Build 5 ).

What do you have to do ? It's very simple. Here are the instructions:


Open your vbindex.php from your webroot directory and do the following:

vbindex.php:

Find:

PHP Code:

// #############################################################################
// unset vB's default template vars, do this at the end so any standard error
// or redirect calls still have the vars for use in the templates.
unset($header$footer$navbar$headinclude); 

Above add:

PHP Code:

// ############## PROCESS RANDOM PIC #######################################

$profilepic 0;

       while (
$profilepic == )
    {
       
srand ((double)microtime()*10000);
       
$randval rand(1,1000);

       
$images $DB_site->query("
        SELECT user.userid, user.username, customprofilepic.profilepicdata
        FROM "
.TABLE_PREFIX."customprofilepic
        LEFT JOIN "
.TABLE_PREFIX."user USING (userid)
        WHERE visible=1 and user.userid = 
$randval
       "
);

        
$rows $DB_site->num_rows($images);

        if (!
$rows)
        {
            
// do nothing because i assume that you have at least 1 picture in your database
        
}
        else
        {
            
$image $DB_site->fetch_array($images);
            
$output_pic "<A HREF=\"./forum/member.php?u=$randval\">$image[username]<BR><BR>";
            
$profilepic 1;
            
$output_pic .= "<img src=\"./forum/image.php?u=$randval&type=pthumb\" border=\"0\" width=\"150\" 

height=\"150\"/></A>"
;
        }
    } 

Templates:

Open vbindex_customblock_3:

Find:

PHP Code:

Block $box Content 

Replace this with:

PHP Code:

$output_pic 

Now enable your custombox_3 in your vboptions in your ACP and all set all done. Have fun !!!


P.S.: If you are using another portal software then you could adopt this script for your use. You just have to find the correct template from your portal software and insert the variable for the output.

Cheers,

FleaBag 04-22-2004 03:32 AM

Eventually got it going after having a fiddle with my database. It really is quite difficult to deal with! Thanks for this hack - keep uo the excellent work.

Boofo 04-22-2004 03:58 AM

Quote:

Originally Posted by Pseudomizer
Hello Velocd,

i just have created another add-on for your hack. What it does ? It implements a random picture on your portal ( tested with vbindex 3.0.0 Build 5 ).

What do you have to do ? It's very simple. Here are the instructions:


Open your vbindex.php from your webroot directory and do the following:

vbindex.php:

Find:

PHP Code:

// #############################################################################
// unset vB's default template vars, do this at the end so any standard error
// or redirect calls still have the vars for use in the templates.
unset($header$footer$navbar$headinclude); 

Above add:

PHP Code:

// ############## PROCESS RANDOM PIC #######################################

$profilepic 0;

       while (
$profilepic == )
    {
       
srand ((double)microtime()*10000);
       
$randval rand(1,1000);

       
$images $DB_site->query("
        SELECT user.userid, user.username, customprofilepic.profilepicdata
        FROM "
.TABLE_PREFIX."customprofilepic
        LEFT JOIN "
.TABLE_PREFIX."user USING (userid)
        WHERE visible=1 and user.userid = 
$randval
       "
);

        
$rows $DB_site->num_rows($images);

        if (!
$rows)
        {
            
// do nothing because i assume that you have at least 1 picture in your database
        
}
        else
        {
            
$image $DB_site->fetch_array($images);
            
$output_pic "<A HREF=\"./forum/member.php?u=$randval\">$image[username]<BR><BR>";
            
$profilepic 1;
            
$output_pic .= "<img src=\"./forum/image.php?u=$randval&type=pthumb\" border=\"0\" width=\"150\" 

height=\"150\"/></A>"
;
        }
    } 

Templates:

Open vbindex_customblock_3:

Find:

PHP Code:

Block $box Content 

Replace this with:

PHP Code:

$output_pic 

Now enable your custombox_3 in your vboptions in your ACP and all set all done. Have fun !!!


P.S.: If you are using another portal software then you could adopt this script for your use. You just have to find the correct template from your portal software and insert the variable for the output.

Cheers,

I tried this on vBadvanced and although it worked great the query count went through the roof on the homepage. ;)

Pseudomizer 04-22-2004 07:51 AM

Quote:

Originally Posted by Boofo
I tried this on vBadvanced and although it worked great the query count went through the roof on the homepage. ;)


Oh oh. Thanks for this hint. This was a quick and dirty implementation for a request. I did not thought about performance because i tested in on my test forum. :disappointed:

But you are right. I will change the PHP code and i will have a look into this how i could reduce it to 1 or 0 queries. :nervous:

Thanks for this hint.

Cheers,


All times are GMT. The time now is 10:50 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.02203 seconds
  • Memory Usage 1,787KB
  • 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
  • (2)bbcode_html_printable
  • (8)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete