vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   PhotoPost vBGallery - Forum Home (https://vborg.vbsupport.ru/showthread.php?t=96152)

Rukas 10-12-2005 03:25 AM

And the beta gives me these errors:

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: array_keys(): The first argument should be an array in /includes/functions_gallery.php on line 427

Warning: Invalid argument supplied for foreach() in /includes/functions_gallery.php on line 427

Warning: Division by zero in /includes/functions_gallery.php on line 1134

Zachariah 10-12-2005 03:43 AM

Did you do the file edit on: forums/index.php // you also have to make the Template change that is in the main Zip file.

The Beta is only the XML file of the hack.

Quote:

Originally Posted by Rukas
And the beta gives me these errors:

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: Invalid argument supplied for foreach() in /index.php(463) : eval()'d code on line 231

Warning: array_keys(): The first argument should be an array in /includes/functions_gallery.php on line 427

Warning: Invalid argument supplied for foreach() in /includes/functions_gallery.php on line 427

Warning: Division by zero in /includes/functions_gallery.php on line 1134


Rukas 10-12-2005 04:19 AM

^^ Yes.

Rukas 10-12-2005 04:24 AM

Ok Ive gotten rid of the error (made a silly mistake i wont even mention hehe) and now it "works", but it doesnt actually display any photos.

http://www.streethop.com/forum/

Rukas 10-12-2005 04:25 AM

Alright, the beta seems to work now, great.

Zachariah 10-12-2005 04:18 PM

Change Log
===========
1.5
- <If> usergroup can not see thunbnails FORUMHOME edit will not show up.

1.4
- Removed Phrase to name gallery <table> now use $vba_options[gallery_title]
- Added 3 prases in "global" - filesize,category,dimensions

Upgrade needs a reinstall of XML product over the old one and replace FORUMHOME template edit.

The file edit did not change.

jluerken 10-12-2005 05:44 PM

Hi Zachariah,

I updated to 1.5 and still get the error:

Parse error: parse error in /path/forum/index.php(470) : eval()'d code on line 141

I want to use this hack so let find out how to solve this :D

Zachariah 10-12-2005 06:50 PM

Quote:

Originally Posted by jluerken
Hi Zachariah,
I updated to 1.5 and still get the error:
Parse error: parse error in /path/forum/index.php(470) : eval()'d code on line 141
I want to use this hack so let find out how to solve this :D

I have not ran into this error.
Take a look @ syntax - perhaps a space or " ' ; that was removed.

Looking @ the index.php file around that area it is erroring, perhaps another hack you have installed ?

// ### TODAY'S EVENTS
line 141
Code:

if (!is_array($vbulletin->eventcache) OR $future != $vbulletin->eventcache['date']){
Did you add a plugin for the calendar or something to do w/ events or birthdays?

mholtum 10-12-2005 06:51 PM

Quote:

Originally Posted by Zachariah
Number of Columns
The number of columns to display in a single row before splitting down to the next one.

AdminCP - vBa Gallery - Modify Settings - Browse Category Options - Number of Columns:


If that changes other things on your site you do not want Changed below to the # of images you wish to show up.


This is the code you were told to paste into your forumhome.
Code:

<!-- start Gallery Images -->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
    <td class="tcat" colspan="$vba_options[gallery_columns]">
    <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_gallery_random')">


Works like a friggen charm. After I read this post 12 times trying to figure out exactly what you meant. I have been on a steady diet of some pretty heavy pain meds for the last 6 weeks trying to recover from, well, anyway, today is my first day out of bed and I have upgraded my site and have almost everything ready again.. I have been starinig at this post ( all three of them) for the last 20 minutes and it finally sunk in... I need a beer. Thanks man..

Zachariah 10-12-2005 06:56 PM

Quote:

Originally Posted by mholtum
... I need a beer. Thanks man..

Don't drink them all :D - Its what gets me past the parse errors durring code.

I realy should of changed it to the same value as $galleryimagelimit so that when changes are made to the # of images show, it fixes the size of the table.

That was in the original hack. Perhaps if there is something else to add / fix I'll sneak it in.

jluerken 10-13-2005 08:20 AM

Quote:

Originally Posted by Zachariah
I have not ran into this error.
Take a look @ syntax - perhaps a space or " ' ; that was removed.

Did you add a plugin for the calendar or something to do w/ events or birthdays?

I have installed:
Event Forums 1.0 Creates tight integration between a forum and a calendar.

but even if I deactive this its not working.

GrendelKhan{TSU 10-13-2005 09:16 AM

btw...
are there any specific instructions for upgrading?

or do I just upload the product with overwrite ON? just checking.

:)

thedvs 10-13-2005 10:11 AM

hehe if i turn the TITLE on, its now showing at the bottom of the thumbs,
on the beta it was above...

Zachariah 10-13-2005 12:27 PM

Quote:

Originally Posted by GrendelKhan{TSU
btw...
are there any specific instructions for upgrading?

or do I just upload the product with overwrite ON? just checking.

:)


Upgrade needs a reinstall of XML product over the old one and replace FORUMHOME template edit.

The file edit did not change.

HMBeaty 10-13-2005 05:34 PM

My little...........bar in the header doesn't go all the way across the template and I can't find where to change that at. Can someone help me on this please? Thanks. (See attachment to see what I mean)

thedvs 10-14-2005 12:00 PM

@NRR see post https://vborg.vbsupport.ru/showpost....3&postcount=52

HMBeaty 10-14-2005 04:30 PM

Quote:

Originally Posted by thedvs

Awesome, that worked. Thank you very much

Blackhat 10-14-2005 06:41 PM

I get this:

Fatal error: Call to a member function on a non-object in /home/usr/public_html/forums/includes/functions_gallery.php on line 1082

Zachariah 10-15-2005 01:34 PM

Quote:

Originally Posted by Blackhat
I get this:

Fatal error: Call to a member function on a non-object in /home/usr/public_html/forums/includes/functions_gallery.php on line 1082

Line 1082:
$images['description'] = $bbcode_parser->do_parse(stripslashes($images[' .........................

(there is more, but i killed the rest)



Set:
$showfields['description'] = 0;

There may be problems with the "description" part of the hack. Try that to see if it works.

mooj 10-17-2005 09:30 AM

Quote:

Originally Posted by Nutzz
Thanks :)

I'm having a little problem, only admins can see the images on the forum home :ermm:
I've tried setting the gallery usergroup permissions to the same as the admin usergroups with no luck, I?m sure this is me again due to your example working fine.

Any help would be appreciated :)

Thanks,
Mat


the same problem .. :ninja:
would you kindly see over it ..?

mooj 10-17-2005 09:46 AM

i tried to cedit (each) group permission and save it as it is, in order to change it from (Default Permissions ) to (Custom Permissions) .. ( and it works properly :) .. )

Nutzz,
try to do it from (Category Permissions > and change the yellow color to red ) ..

:)

Zachariah 10-17-2005 12:09 PM

@mooj and others.

The only thing that will stop the images from showing up on the forumhome is in ver. 1.5 of the hack.

1.5
- <If> usergroup can not see thunbnails FORUMHOME edit will not show up.

AdminCP => vBa Gallery => Usergroup Permissions => Modify Permissions =>

Can view thumbnails: [ ]yes [x]no

Jason McConnell 10-17-2005 03:03 PM

Quote:

Originally Posted by Zachariah
Line 1082:
$images['description'] = $bbcode_parser->do_parse(stripslashes($images[' .........................

(there is more, but i killed the rest)



Set:
$showfields['description'] = 0;

There may be problems with the "description" part of the hack. Try that to see if it works.

Back when KW802 first released this hack, he had a problem with the word stripslashes... for some reason they were getting an extra space added in there somewhere.

I'm also glad to say it's working fine on this end :D Any plans on releasing this as a CMPS Module?

Zachariah 10-17-2005 06:36 PM

Quote:

Originally Posted by Jason McConnell
Back when KW802 first released this hack, he had a problem with the word stripslashes... for some reason they were getting an extra space added in there somewhere.

I'm also glad to say it's working fine on this end :D Any plans on releasing this as a CMPS Module?

Yes sir. on the Module - ill look on the error to see if KW got an fix on that error.

jlaine 10-18-2005 06:17 AM

Quote:

Originally Posted by Zachariah
Line 1082:
$images['description'] = $bbcode_parser->do_parse(stripslashes($images[' .........................

(there is more, but i killed the rest)



Set:
$showfields['description'] = 0;

There may be problems with the "description" part of the hack. Try that to see if it works.

It doesn't (at least not for me - I'm having the same issue) - looking into the comment on the whitespace issue above though...

MotoUp 10-18-2005 09:05 PM

Works great, thanks. :D

Michael-DLR 10-18-2005 11:45 PM

Quote:

Originally Posted by Blackhat
I get this:

Fatal error: Call to a member function on a non-object in /home/usr/public_html/forums/includes/functions_gallery.php on line 1082

I upgraded tonight and now I am in the same situation. Any time frame when we think we will have a fix?

Thank you,

Michael

Zachariah 10-19-2005 12:16 PM

Quote:

Originally Posted by Michael-DLR
I upgraded tonight and now I am in the same situation. Any time frame when we think we will have a fix?

Thank you,

Michael

I found this @ Vbadvanced.com. My personal Gallery already has this edit, but it might help.

Quote:

Quote:
Fatal error: Call to a member function on a non-object in /path/to/forums/includes/functions_gallery.php on line 1082


... un-ticking the "Descriptions" on the Gallery Settings, Main Page display, allows the front page to load up fine. Thoughts?

If you'll look in your includes/functions_gallery.php file for this code:
PHP Code:

    global $vba_options$stylevar$vbulletin$vbphrase$show$adv_sorturl$catinfo$counter$cellwidth$categoryperms$showfields$categorycache$catopts

Replace with:
PHP Code:

    global $vba_options$stylevar$vbulletin$vbphrase$show$adv_sorturl$catinfo$counter$cellwidth$categoryperms$showfields$categorycache$catopts$bbcode_parser

Then find:
PHP Code:

        $images['description'] = parse_bbcode2(stripslashes($images['description']), $catopts["$images[catid]"]['allow_desc_html'], $catopts["$images[catid]"]['allow_desc_bbimgcode'], $catopts["$images[catid]"]['allow_desc_smilies'], $catopts["$images[catid]"]['allow_desc_bbcode']); 

Replace with:
PHP Code:

        $images['description'] = $bbcode_parser->do_parse(stripslashes($images['description']), $catopts["$images[catid]"]['allow_desc_html'], $catopts["$images[catid]"]['allow_desc_smilies'], $catopts["$images[catid]"]['allow_desc_bbcode'], $catopts["$images[catid]"]['allow_desc_bbimgcode']); 

And that should take care of the problem.

Michael-DLR 10-19-2005 12:40 PM

Quote:

Originally Posted by Zachariah
I found this @ Vbadvanced.com. My personal Gallery already has this edit, but it might help.




If you'll look in your includes/functions_gallery.php file for this code:
PHP Code:

    global $vba_options$stylevar$vbulletin$vbphrase$show$adv_sorturl$catinfo$counter$cellwidth$categoryperms$showfields$categorycache$catopts

Replace with:
PHP Code:

    global $vba_options$stylevar$vbulletin$vbphrase$show$adv_sorturl$catinfo$counter$cellwidth$categoryperms$showfields$categorycache$catopts$bbcode_parser

Then find:
PHP Code:

        $images['description'] = parse_bbcode2(stripslashes($images['description']), $catopts["$images[catid]"]['allow_desc_html'], $catopts["$images[catid]"]['allow_desc_bbimgcode'], $catopts["$images[catid]"]['allow_desc_smilies'], $catopts["$images[catid]"]['allow_desc_bbcode']); 

Replace with:
PHP Code:

        $images['description'] = $bbcode_parser->do_parse(stripslashes($images['description']), $catopts["$images[catid]"]['allow_desc_html'], $catopts["$images[catid]"]['allow_desc_smilies'], $catopts["$images[catid]"]['allow_desc_bbcode'], $catopts["$images[catid]"]['allow_desc_bbimgcode']); 

And that should take care of the problem.

Thank you so much for helping. My file already has these changes in it as well. I wonder what the problem could be?

jlaine 10-21-2005 04:02 AM

There definitely was a whitespace error inside my functions_gallery - but it did not remedy the situation. Zachariah - can I send you my existing functions_gallery.php file so you can compare it to yours? (or the other way around, whichever...)

Perhaps you can do a live swap to see if there is another whitespace error somewhere inside that file that I didn't see - at least it could be ruled out that way anyway. Seems to have to do something with the actual parsing function itself - because I've found if the images it pulls up have no image descriptions at all - the page loads fine. Doesn't seem to effect it one way or the other if I disable or enable the display descriptions inside the mod you've made though.

Acers 10-21-2005 07:22 AM

anyway to make this work so that the images are shown only in a specific forumdisplay rather than the forumhome?
eg if i have a movie forum, then in that forumdisplay i want to show the images from the gallery (moovie subsection)

Zachariah 10-21-2005 11:50 AM

Quote:

Originally Posted by Acers
anyway to make this work so that the images are shown only in a specific forumdisplay rather than the forumhome?
eg if i have a movie forum, then in that forumdisplay i want to show the images from the gallery (moovie subsection)

The plugins will not be a problem to re-route. The only big thing @ the moment is the file(s) that need to be edited.

This hack edits forums/index.php. To show on a fourmdisplay there will have to be some edits to forumdisplay.php and/or showthread.php. Untill VB DEVS re-code $specialtemplates to allow a plugin.

Acers 10-21-2005 12:16 PM

hmm ok ready to do file edits if that can be done.
can you give the code if its possible :)

Zachariah 10-21-2005 02:35 PM

Quote:

Originally Posted by Acers
hmm ok ready to do file edits if that can be done.
can you give the code if its possible :)

Try this out. ( I have not tested this yet)

1)
edit plugin: Forumhome: Gallery Main
change hook to: forumdisplay_complete

2)
edit forumdisplay.php
PHP Code:

Find:
 
'mailqueue'  

Replace with:

 
'mailqueue',  
 
'gallery_c_cache',  
 
'adv_gallery_opt',  
 
'gallery_ugroups' 

3)
Now add the following in your 'FORUMDISPLAY' template where you would like the images to appear change $forumid to forums you want.

Code:

<!-- start Gallery Images -->
<if condition="$forumid=1,2,3,4,5">
<if condition="$randomimagebits">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
    <td class="tcat" colspan="$vba_options[gallery_columns]">
    <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_gallery_random')">
        <img id="collapseimg_forumhome_gallery_random" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0"/>
    </a>
    <a href="$vba_options[gallery_url]">$vba_options[gallery_title]</a>
    </td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_gallery_random" style="$vbcollapse[collapseobj_forumhome_gallery_random]">
<tr>$randomimagebits</tr>
</tbody>
</table><br /></if></if>
<!-- end Gallery Images -->

To show on every page of a thread vs. forum index
edit: showthread.php

HTML Code:

Find
'hidprofilecache'

Replace with:

 'hidprofilecache', 
 'gallery_c_cache', 
 'adv_gallery_opt', 
 'gallery_ugroups'

3)
Now add the following in your 'SHOWTHREAD' template where you would like the images to appear change $forumid to forums you want.

Code:

<!-- start Gallery Images -->
<if condition="$forumid=1,2,3,4,5">
<if condition="$randomimagebits">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
    <td class="tcat" colspan="$vba_options[gallery_columns]">
    <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_gallery_random')">
        <img id="collapseimg_forumhome_gallery_random" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0"/>
    </a>
    <a href="$vba_options[gallery_url]">$vba_options[gallery_title]</a>
    </td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_gallery_random" style="$vbcollapse[collapseobj_forumhome_gallery_random]">
<tr>$randomimagebits</tr>
</tbody>
</table><br /></if></if>
<!-- end Gallery Images -->


Zachariah 10-21-2005 08:15 PM

Quote:

Originally Posted by Michael-DLR
I upgraded tonight and now I am in the same situation. Any time frame when we think we will have a fix?

Thank you,

Michael

Sir try this:


Plugin: Forumhome: Gallery Main

Find:
require_once('./includes/class_bbcode.php');

after add:
$show['category'] = true;

Michael-DLR 10-21-2005 08:48 PM

Quote:

Originally Posted by Zachariah
Sir try this:


Plugin: Forumhome: Gallery Main

Find:
require_once('./includes/class_bbcode.php');

after add:
$show['category'] = true;

Hi,

Thank you so much for looking into this for me. I have added the code as per your instructions and I get the same error.

Thank you,

Michael

Michael-DLR 10-21-2005 10:48 PM

I opted to use this http://www.vbadvanced.com/forum/showthread.php?t=10224

Until we can figure out why the call member function is not working correctly for me.

Thank you!

Michael

cbr929rrerion 10-22-2005 09:29 PM

Quote:

Originally Posted by Zachariah
Plugin - Forumhome: Gallery Main

Try this:

Find:
Code:

    $getrand =  $db->query_read(" 
                SELECT imageid, images.title, filename, thumbname, originalname, extension, images.catid $query[fields] 
                FROM " . TABLE_PREFIX . "adv_gallery_images AS images 
                $query[tables] 
                WHERE $privcatids valid = 1 $ignquery 
                ORDER BY $galleryorderby 
                LIMIT $galleryimagelimit
        ");

Replace
Code:

$getrand =  $db->query_read(" 
                SELECT imageid, catid, images.title, filename, thumbname, originalname, extension, images.catid $query[fields] 
                FROM " . TABLE_PREFIX . "adv_gallery_images AS images 
                $query[tables] 
                WHERE $privcatids valid = 1 $ignquery 
                AND catid in (1,2,3,4,5,6,7,8,9)
              ORDER BY $galleryorderby 
                LIMIT $galleryimagelimit
        ");

The RED can be filled in by Cat ID's


True, but limits of cats is handy to promote ideas you wish to convay to the plublic vs. random all cats.


where is this code located?

Zachariah 10-22-2005 10:15 PM

Quote:

Originally Posted by cbr929rrerion
where is this code located?

Please click " install " for updates

Old code: now looks like this.

USEAGE:

When you create the Module:
Title Row Colspan: image count (you choose a value)


Admincp => Plugin Manager => Hook Location : forumhome_complete => Forumhome: Gallery Main => EDIT



Code:

// If you HASH out "$catlimit" images will pull from all categories.
// Useage: $catlimit = 3,5,10,30,70;

// $catlimit = 3;


// Enter 1 newest, 2 most viewed, 3 most comments, 4 highest rated, 5 random.
$galleryorderby = 5;

Added Extra Options
// If you DON'T want these fields to show then value = "0" (zerro)
   
$showfields['title'] = 0;
$showfields['description'] = 0;
$showfields['rating'] = 0;
$showfields['user'] = 0;
$showfields['dateline'] = 0;
$showfields['views'] = 0;
$showfields['dimensions'] = 0;
$showfields['filesize'] = 0;
$showfields['posts'] = 0;
$showfields['lastpost'] = 0;
$show['category'] = 0;


lazytown 10-24-2005 11:11 AM

I had some serious problems when I installed this. It worked at first, but then threw off my entire forum. I'd like to run it, so please let me know when there is an update or other people are running this stable.

-V


All times are GMT. The time now is 06:48 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.01922 seconds
  • Memory Usage 1,910KB
  • 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
  • (7)bbcode_code_printable
  • (1)bbcode_html_printable
  • (9)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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