PDA

View Full Version : SMF enhanced integration mod available?


skidpics
August 3rd, 2008, 09:17 AM
I was reading a thread about an integration mod that allows the gallery listing to be integrated into the vbulletin forum:
here is the thread:

http://www.photopost.com/forum/photopost-product-faqs/110527-photopost-enhanced-vb3-index-integration.html

Is something like this avaiable for SMF?

Chuck S
August 3rd, 2008, 01:15 PM
No sorry I am not aware of anything like that. You could theoretically alter the style classes in that file and instructions and try to include something like this in the appropriate SMF index file or template


include('/var/www/html/gallery/inc_features.php');
echo "$photopostfeature";


Its pretty versatile little mod.

skidpics
August 20th, 2008, 07:06 AM
No sorry I am not aware of anything like that. You could theoretically alter the style classes in that file and instructions and try to include something like this in the appropriate SMF index file or template


include('/var/www/html/gallery/inc_features.php');
echo "$photopostfeature";


Its pretty versatile little mod.

You mean these 2 files?

Chuck S
August 20th, 2008, 12:23 PM
I mean that you would possible modify our inc_features.php file written for vb styles to smf style class colors and then simply try and include it within your smf page where you like. Obviously I do not use SMF so thats as far as my advise can go.

skidpics
October 5th, 2008, 11:17 AM
I mean that you would possible modify our inc_features.php file written for vb styles to smf style class colors and then simply try and include it within your smf page where you like. Obviously I do not use SMF so thats as far as my advise can go.

are you saying to edit the $photopostfeature Part at the bottom of the file, which includes the styles to show the feature, correct?

$photopostfeature = <<<PPPRINT
<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="1" border="0" width="100%">
<thead>
<tr>
<td class="tcat" colspan="$columns" align="center">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('featurepal');"><img id="collapseimg_featurepal" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_featurepal].gif" alt="" border="0" /></a>
Featured Photos
</td>
</tr>
</thead>
<tbody id="collapseobj_featurepal" style="$vbcollapse[collapseobj_featurepal]">
<tr>
$featured
</tr>
</tbody>
</table>
</td>
</tr>
</table>

Chuck S
October 5th, 2008, 12:10 PM
yes you would edit that such style class stuff. You need to remove all the $viewperm stuff as well which is only for vb.

skidpics
October 6th, 2008, 07:04 PM
Does PP work with the SMF beta version?

Chuck S
October 6th, 2008, 07:25 PM
what is the beta version? It may or may not work I have not tested it myself.

skidpics
October 6th, 2008, 07:25 PM
what is the beta version? It may or may not work I have not tested it myself.

2.0 Beta 4 - of SMF of course.

Chuck S
October 6th, 2008, 07:32 PM
I dont know if it will or not but you can install a test forum and let me know if you want. We normally dont support beta software and look at forum integrations when they do new supported versions.

skidpics
October 19th, 2008, 11:11 PM
after looking the inc_features.php over a bit, it appears I might need to change the database information also, since it is calling vb specific items from the database..

skidpics
October 30th, 2008, 09:54 PM
can the file be modified to just pull the required images from the database instead of checking with all the vbulletin settings? I haven't had much luck within SMF yet to show the images..

Basicailly just act like the 'show images on any page mod'

Chuck S
October 30th, 2008, 11:27 PM
You would need to remove all the vb permissions stuff. one thing to definately remove is this


if ( $ViewPerm[$pcat] == 1 )
{
continue;
}

skidpics
November 1st, 2008, 07:54 PM
I deleted what I can see as vbulletin entries. I am now getting black thumbnail spots with links to the images. What would be causing the lack of thumbnails?

skidpics
November 1st, 2008, 08:01 PM
I deleted what I can see as vbulletin entries. I am now getting black thumbnail spots with links to the images. What would be causing the lack of thumbnails?

Inc file attached in txt

Chuck S
November 2nd, 2008, 09:14 AM
Looks fine to me set the proper data url in edit integration in admin settings with a slash after data in there.

skidpics
November 2nd, 2008, 10:55 PM
that didn't do the trick - still black thumbnails

Skidpics Community - Index (http://skidpics.com/forum/indextester.php)

Chuck S
November 3rd, 2008, 06:09 AM
Feel free to post a link to the actual site using the hack your making and when I get a minute I can post my thoughts.

skidpics
November 3rd, 2008, 06:39 AM
http://skidpics.com/forum/indextester.php

test index file

skidpics
November 12th, 2008, 09:39 PM
any luck in checking it out? Black thumbnails, links back to images okay...

it is not finding the thumbnails..

The file is located in the root, and the forum is located in forum..

skidpics
November 12th, 2008, 09:59 PM
Been reading about the trailing slash on the data directory and tried the url with data/ and the server path with data/

If you set the url data/, the hotlink codes shows a double //, so that won't work, and neither did it work.

I modified $data_dir = "http://skidpics.com/galleries/data/"; in the config-int.php to show with a trailing /, and it works..

why doesn't this setting get changed when you edit it this via admin cpanel??

Now, inc_photopost.php has to be edited also to show the categories, correct?

Chuck S
November 13th, 2008, 08:55 AM
My files are modified if I edit them through the admin panel remember they actually need to be writable on the server set as 666 to be modified.

skidpics
November 13th, 2008, 10:15 PM
Any suggestions on how to get the featured thumbs to show below the navigation bar of SMF?

Chuck S
November 13th, 2008, 10:17 PM
Not really sorry I dont use that product but I would assume possibly maybe hack your index.php file for smf and in some spot in that file do an include and echo the variable? you might want to ask over at SMF and see if they have some thoughts.

skidpics
November 13th, 2008, 10:18 PM
the index is small and just pulls in included from the template directory.

I tried adding it to another place in the index, but I get nothing. Then if I add within the template, I get errors. it seems like I have found the only place in the main index file where it actually works. weird.

skidpics
November 14th, 2008, 06:37 AM
I have another question then.. and I will post any results on this issue from what I find out on the SMF forums - Might help someone in the future.

Here is another issue with the SMF integration. When logging in, the styles are gone, meaning, all I get is the login prompts on a blank screen(white).

Chuck S
November 14th, 2008, 09:30 AM
try in pp-inc.php changing this


function login( $redirect )
{
global $Globals, $Style, $User, $link, $ppopen, $ppclose, $db_link;

list( $forgot_link, $register_link ) = get_logincode();



to this


function login( $redirect )
{
global $Globals, $Style, $User, $link, $ppopen, $ppclose, $db_link;

$stylesheet = get_forum_style();
list( $forgot_link, $register_link ) = get_logincode();

skidpics
November 14th, 2008, 08:16 PM
that didn't work..

The menus disappear also on the top - the only ones that show are the ones I manually added to the menu template.

http://skidpics.com/misc.php?action=login&login=yes

Chuck S
November 14th, 2008, 08:27 PM
well try making that function login this


function login( $redirect )
{
global $Globals, $Style, $User, $link, $ppopen, $ppclose, $db_link;

if ( $Globals['vbversion'] == "threads" && $Globals['forumstyle'] == "yes" ) {
$User['stylesheet'] = $Globals['threads'];
}
elseif ( $Globals['vbversion'] == "phpbb2" && $Globals['forumstyle'] == "yes" ) {
$styleb = ppmysql_query("SELECT config_value FROM {$Globals['dprefix']}config WHERE config_name='default_style'", $db_link);
list( $styleid ) = mysql_fetch_row($styleb);

$stylec = ppmysql_query("SELECT template_name FROM {$Globals['dprefix']}themes WHERE themes_id='$styleid'", $db_link);
list( $defaultstyle ) = mysql_fetch_row($stylec);

$User['stylesheet'] = $defaultstyle;
}
elseif ( $Globals['vbversion'] == "ib" && $Globals['forumstyle'] == "yes" ) {
if ( empty($Globals['dprefix']) ) $Globals['dprefix'] ="ibf_";
$stylec = ppmysql_query("SELECT css_id FROM {$Globals['dprefix']}skins WHERE default_set='1'", $db_link);
list( $defaultstyle ) = mysql_fetch_row($stylec);

$User['stylesheet'] = $defaultstyle;
}
elseif ( $Globals['vbversion'] == "ib2" && $Globals['forumstyle'] == "yes" ) {
if ( empty($Globals['dprefix']) ) $Globals['dprefix'] ="ibf_";
$stylel = ppmysql_query("SELECT set_skin_set_id FROM {$Globals['dprefix']}skin_sets WHERE set_default='1'", $db_link);
list( $defaultstyle ) = mysql_fetch_row($stylel);

$User['stylesheet'] = $defaultstyle;
}
elseif ( $Globals['vbversion'] == "smf" && $Globals['forumstyle'] == "yes" ) {
$stylec = ppmysql_query("SELECT value FROM {$Globals['dprefix']}settings WHERE variable ='theme_default'", $db_link);
list( $defaultstyle ) = mysql_fetch_row($stylec);

$styled = ppmysql_query("SELECT value FROM {$Globals['dprefix']}themes WHERE variable ='theme_url' AND ID_THEME = '$defaultstyle'", $db_link);
list( $finalstyle ) = mysql_fetch_row($styled);

$User['stylesheet'] = $finalstyle;
}
elseif ( $Globals['vbversion'] == "e107" && $Globals['forumstyle'] == "yes" ) {
$results = ppmysql_query("SELECT * FROM {$Globals['dprefix']}core WHERE e107_name='pref'", $db_link);
list( $e107_name,$e107_value ) = mysql_fetch_row($results);

$pref=unserialize(stripslashes($e107_value));

$User['stylesheet'] = $pref['sitetheme'];
}
elseif ( $Globals['vbversion'] == "mybb" && $Globals['forumstyle'] == "yes" ) {
$User['stylesheet'] = "1";
}
elseif ( $Globals['vbversion'] == "wowbb" && $Globals['forumstyle'] == "yes" ) {
$User['stylesheet'] = $Globals['threads'];
}
elseif ( $Globals['vbversion'] == "fusion" && $Globals['forumstyle'] == "yes" ) {
$User['stylesheet'] = $Globals['threads'];
}

list($forgot_link, $register_link) = get_logincode();

printheader( 0, "Login" );
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/menubar.tmpl" );
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/login.tmpl" );
printfooter();

return(1);
}

skidpics
November 14th, 2008, 08:31 PM
no change again.. Hmm..

Chuck S
November 14th, 2008, 08:37 PM
I find that hard to believe honestly that that results in nothing in either case.

The first change should easily have done it calling get_forum_style as thats the function used throughout the program and actually called in printheader already to grab the style.

skidpics
November 14th, 2008, 08:38 PM
let me reboot and flush my cache again.

have you view it in your browser?

Skidpics 4images - Login (http://skidpics.com/misc.php?action=login&login=yes)

skidpics
November 14th, 2008, 08:42 PM
tried on my end and still nothing different. Applied the 2nd set if changes to the file.

Chuck S
November 14th, 2008, 09:06 PM
well look at your source

I would need to see your files

skidpics
November 15th, 2008, 10:42 PM
there wouldn't be anything in the misc.php file I could add to get the stylesheet to work would there, since it calls that file?

and like I stated, but not sure if there is clue that none of the menubar is showing except the modded links I added to menubar.tmpl?

In the source listing, it is linking the stylesheet to this: <link rel="stylesheet" href="http://skidpics.com/lightbox.css" type="text/css" media="screen" />

skidpics
November 15th, 2008, 10:54 PM
I will have to review some codes. I uploaded new copies of misc.php and pp-inc.php, and it changed nothing..

Chuck S
November 16th, 2008, 11:14 AM
<link rel="stylesheet" href="/style.css" type="text/css" />

It is listing the style as this

I would definately need to see the files and have access to say anymore.

skidpics
November 16th, 2008, 11:19 AM
do you need admin access or ftp access?

this part is missing if I pull up the source from a dummy site I have up to tweak with.

<link rel="stylesheet" href="http://skidpics.com/forum/Themes/default/style.css" type="text/css" />

Chuck S
November 16th, 2008, 11:34 AM
I would need both

skidpics
December 13th, 2008, 03:22 PM
I cannot PM you - Where can I send the login info?

Chuck S
December 13th, 2008, 04:15 PM
This is an old discussion back to life

You would use the contact us link in the site header for any support issue.

skidpics
December 13th, 2008, 08:58 PM
Indeed - In my line of work, I have been very busy with the season and haven't much time to mess with anything.

I will pass along the details here in a bit. thanks Chuck!

Chuck S
December 13th, 2008, 10:11 PM
have a good one yes this holiday season is passing by quickly and it is indeed busy out there.

skidpics
December 14th, 2008, 08:01 PM
Thanks for the help Chuck - not sure what happened to that setting

skidpics
December 15th, 2008, 07:32 AM
Chuck,

Ever since that was changed I show page generation time at the bottom of every page. I checked SMF and the 'Display Page Generation Time" is turned off, and does not show on the forum, but at the bottom of each PP page, I get this:

Page generated in 0.18347 seconds with 23 queries
1: SELECT varname,setting FROM pp_settings (0.00029 sec)
2: SELECT smf_members.ID_MEMBER,smf_members.memberName,smf_members.emailAddress,smf_members.passwd,smf_members.ID_GROUP,smf_members.timeOffset,smf_members.ID_THEME,smf_members.additionalGroups,smf_members.ID_POST_GROUP,smf_log_online.session,smf_members.passwordSalt FROM smf_members LEFT JOIN smf_log_online ON smf_log_online.ID_MEMBER='1' WHERE smf_members.ID_MEMBER='1' (0.00071 sec)
3: SELECT value FROM smf_settings WHERE variable ='theme_guests' (0.00007 sec)
4: SELECT value FROM smf_themes WHERE variable ='theme_url' AND ID_THEME = '1' (0.00006 sec)
5: SELECT groupid,cpaccess,modaccess,diskspace,uploadsize,uplimit,uploads,comments,editpho,editposts,useralbums,reqmod,canassign FROM pp_usergroups WHERE groupid=1 OR groupid=5 OR groupid=8 (0.00008 sec)
6: SELECT id,ugnoupload,ugnoview,password,cattype,ismember,catname,parent,children,thumbs,canzip,moderators,header,footer,headtags,subalbum FROM pp_categories (0.00036 sec)
7: SELECT username,mature FROM pp_users WHERE userid=1 LIMIT 1 (0.00061 sec)
8: SELECT id FROM pp_photos WHERE approved=0 (0.00007 sec)
9: SELECT count(*) FROM pp_messages WHERE userid=1 AND status=0 (0.00006 sec)
10: UPDATE IGNORE pp_users SET username='skidpics',laston=1229344223 WHERE userid=1 LIMIT 1 (0.00041 sec)
11: REPLACE INTO pp_iponline (ipaddr,userid,uid,date,what,item,agent,referer) VALUES ('75.32.51.38','skidpics',1,'1229344223','index','','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4','http://skidpics.com/forum/index.php') (0.00049 sec)
12: DELETE FROM pp_iponline WHERE date < 1229343623 (0.00023 sec)
13: SELECT c.id, c.description, c.catorder, c.photos, c.posts, c.catdepth, p.id, p.bigimage, p.cat, p.approved, p.user, p.userid, p.date, p.width, p.height, p2.bigimage, p2.cat, p2.storecat, p2.userid, p2.width, p2.height, com.username, com.id, com.date, com.photo FROM pp_categories c LEFT JOIN pp_photos p ON c.lastphoto=p.id LEFT JOIN pp_photos p2 ON c.thumbnail=p2.id LEFT JOIN pp_comments com ON com.id=c.lastpost ORDER BY c.catorder ASC (0.00043 sec)
14: SELECT cat,laston FROM pp_laston WHERE userid='1' (0.00020 sec)
15: SELECT item, count(*) FROM pp_iponline GROUP BY item (0.00042 sec)
16: SELECT user,userid,COUNT(*) AS pcount FROM pp_photos GROUP BY user ORDER BY pcount DESC LIMIT 5 (0.00013 sec)
17: SELECT count(*) AS vcount,avg(c.rating) AS avgr,p.cat,p.id,p.title,p.rating AS avgr FROM pp_comments c LEFT JOIN pp_photos p ON p.id=c.photo WHERE p.numcom > 1 GROUP BY c.photo ORDER BY avgr desc,vcount desc LIMIT 5 (0.00009 sec)
18: SELECT c.username,c.userid,c.cat,c.photo,c.comment,p.bigimage,p.cat,p.storecat,p.userid,p.width,p.height FROM pp_categories a LEFT JOIN pp_comments c ON a.id=c.cat LEFT JOIN pp_photos p ON p.id=c.photo WHERE comment != '' AND a.password = '' ORDER BY c.date DESC LIMIT 15 (0.00013 sec)
19: SELECT userid,date,uid,what FROM pp_iponline ORDER BY date DESC (0.00063 sec)
20: SELECT id,user,userid,cat,storecat,title,ismature,bigimage,height,width, id*0+RAND() as rand_col FROM pp_photos WHERE approved=1 AND storecat=0 ORDER BY rand_col DESC LIMIT 45 (0.02703 sec)
21: SELECT id,user,userid,cat,storecat,title,ismature,bigimage,height,width, id*0+RAND() as rand_col FROM pp_photos WHERE approved=1 AND storecat=0 ORDER BY rand_col DESC LIMIT 45 (0.02801 sec)
22: SELECT id,user,userid,cat,storecat,ismature,title,bigimage,height,width FROM pp_photos WHERE approved=1 AND storecat=0 ORDER BY date DESC LIMIT 45 (0.00023 sec)
23: SELECT id,user,userid,cat,storecat,title,ismature,bigimage,height,width FROM pp_photos WHERE approved=1 AND storecat=0 ORDER BY views DESC LIMIT 45 (0.00020 sec)

Any suggestion on how to get rid of this? It appears that it only shows when logged in as Admin for sure.

Chuck S
December 15th, 2008, 08:04 AM
Gone debug was on ;)

skidpics
December 15th, 2008, 01:02 PM
Thanks.

Chuck S
December 15th, 2008, 01:40 PM
yeah once I saw on your site your SMF had your default style set to 0 which of course did not correspond to any actual theme on your site setting the default theme to 1 cured your issue so it did not actually end up being a photopost issue.

skidpics
January 3rd, 2009, 01:34 PM
what setting in the DB did you change? I switched themes, and the same thing happened..

Chuck S
January 3rd, 2009, 01:54 PM
All I did is make sure the default theme in the SMF database corresponded to an actual theme id, If its messing up again that might be an SMF bug because if you switch a theme it should be an integer like 1 2 3 which corresponds to an actual theme id in the database themes table. Yours was 0 before.

skidpics
January 3rd, 2009, 05:57 PM
The only thing I can find about themes in smf is the smf_themes..

Which one needs to be changed back to 1? All are listed as 1 under ID-Theme

Chuck S
January 3rd, 2009, 08:24 PM
In the smf settings table is a variable called default theme that needs to correspond to the correct default theme


$stylec = ppmysql_query("SELECT value FROM {$Globals['dprefix']}settings WHERE variable ='theme_default'",$db_link);