Author Topic: [MOD] SMF integration  (Read 137667 times)

0 Members and 1 Guest are viewing this topic.

Offline Anarchology

  • Jr. Member
  • **
  • Posts: 60
  • I LULZ too much!
    • View Profile
    • Tainted Pix
Re: [MOD] SMF integration
« Reply #45 on: January 29, 2009, 04:19:15 AM »
Very nice budduke.  :D

Its looking pretty good, and easily modified to cater to anyone's specific needs. I'm just wondering if there is a way to allow for the linking to those new threads, user names, and categories. I'm going to keep pushing to see if I could get the SSI.php to work. Maybe I'll play around with your code, and see how it goes from here.

EDIT: Having set "array" to "echo" seemed to crash my site by making the posts show up on the index page with a white background, and an error below shows up. However, the posts, user names, and categories are all linked up! I thought that was a little funny.

Code: [Select]
Fatal error: Cannot use string offset as an array in /home/sayyo1/public_html/taintedpix/includes/template.php(101) : eval()'d code on line 11
EDIT2: Alright, I figured it out, and the look is pretty nice! I'm liking it. I'm sure I'm not as well versed with code budduke, so this is what you meant to probably use in order to use "echo". I shortened the code.

Code: [Select]
<?php 
$test
=smf_api_recent_posts(6null"<ul>"" ""echo");
$var=0;

unset(
$test);
flush();
?>

How it shows up...
http://taintedpix.com/testindex.php

I'm wondering what other streams of code could be used like recent "members", "new threads"? I'm guessing it all has to do with looking through the smf_api file, right?

ANOTHER EDIT/UPDATE: Wow, the code works great, and is almost exactly how I want it! Its a little bunched up, but maybe here are ways to fix all of that. That is probably the only difference between the "smf_api_2.php" seems to be different from the "SSI.php features.

Here are the examples...

http://taintedpix.com/forum/smf_api_2_examples.php
vs.
http://www.simplemachines.org/community/ssi_examples.php

As of right now, my test page I have linked above has just the raw code put directly into where I need it rather than inclusion of the smf_api_posts.html file. I have also removed the code from the page_header.php file with no problems. However, I'm trying to add two other functions... New Topics and Users Online.

Now when I tried the code you have listed above for Posts and tried to convert to "Topics", it seemed to still just show Posts on my page. Very odd. I must be missing something here. I have tried to modify the code above as shown below, but it still just shows Posts.  8O

Code: [Select]
<?php 
$test
=smf_api_recent_topics(6null"<ul>"" ""echo");
$var=0;

unset(
$test);
flush();
?>
« Last Edit: January 29, 2009, 07:08:58 AM by Anarchology »
A personal THANK YOU to all of the great programmers on this site for helping me get my site from something basic to what it is today!

My site: http://taintedpix.com
(warning: some adult content)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] SMF integration
« Reply #46 on: January 29, 2009, 01:43:45 PM »

Now when I tried the code you have listed above for Posts and tried to convert to "Topics", it seemed to still just show Posts on my page. Very odd. I must be missing something here. I have tried to modify the code above as shown below, but it still just shows Posts.  8O

Code: [Select]
<?php 
$test
=smf_api_recent_topics(6null"<ul>"" ""echo");
$var=0;

unset(
$test);
flush();
?>

It appears that it is working correctly. I had to look at it twice to figure out the difference between topics and posts.
If you notice when you run the topics routine you do not see and RE: in any of them. It just give you the top level of a thread
But the posts gives you replies and everything so it looks like it works to me...
Buddy Duke
www.budduke.com

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: [MOD] SMF integration
« Reply #47 on: January 30, 2009, 05:16:20 PM »

Now when I tried the code you have listed above for Posts and tried to convert to "Topics", it seemed to still just show Posts on my page. Very odd. I must be missing something here. I have tried to modify the code above as shown below, but it still just shows Posts.  8O

Code: [Select]
<?php 
$test
=smf_api_recent_topics(6null"<ul>"" ""echo");
$var=0;

unset(
$test);
flush();
?>

It appears that it is working correctly. I had to look at it twice to figure out the difference between topics and posts.
If you notice when you run the topics routine you do not see and RE: in any of them. It just give you the top level of a thread
But the posts gives you replies and everything so it looks like it works to me...

I used this code to and is working perfectly, thanks alot budduke & Anarchology

Offline Semi Kolon

  • Newbie
  • *
  • Posts: 20
  • Doodling is geil :P
    • View Profile
    • doodling.DE - express yourself!
Re: [MOD] SMF integration
« Reply #48 on: February 15, 2009, 09:03:47 PM »
(The SMF PMs in Galerie add)
Hey budduke,
thanks for your answer  :) i tried it, but it didn't work for me. i just get a page that tells me i got an error in my templates.php site. do i need to change other files? i use your integration   :)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] SMF integration
« Reply #49 on: February 16, 2009, 12:07:13 AM »
the only file that I remeber messing with was the user_logininfo.html file in the templates folder.

make sure you inserted this entire code where you were wanting it to display
Code: [Select]
<?php smf_api_pm2('echo');?>
What template are you using?
Buddy Duke
www.budduke.com

Offline Semi Kolon

  • Newbie
  • *
  • Posts: 20
  • Doodling is geil :P
    • View Profile
    • doodling.DE - express yourself!
Re: [MOD] SMF integration
« Reply #50 on: February 16, 2009, 10:31:03 PM »
hmm doesn't really work for me.
i will try to figure something out tomorrow.
i use my own template u can look at it here

Offline Sheon

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: [MOD] SMF integration
« Reply #51 on: March 06, 2009, 02:17:53 PM »
Great mod! But how to convert 4images DB into SMF BD? This mod working only by new users.

Offline Baphomet

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [MOD] SMF integration
« Reply #52 on: March 11, 2009, 10:30:49 AM »
How does this mod integrate the 2 separate databases out of curiosity? I did a fresh install of the latest 4images + SMF last night and woud like to give this mod a try when I get home - just wondering how it implements it.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] SMF integration
« Reply #53 on: March 11, 2009, 08:37:10 PM »
How does this mod integrate the 2 separate databases out of curiosity? I did a fresh install of the latest 4images + SMF last night and woud like to give this mod a try when I get home - just wondering how it implements it.

The api handles the communcation between the 2 databases. They stay entirely seperate in case you decide to seperate them later. the main thing is that you have to create the user on the 4images side in order for it to create a user on the smf side.
If you already have a user on the smf with that username but with a different password then it will not log into the smf side. (A little confusing)

In my testing, if I had a user on the smf side already created with the same password and I logged into the 4images side with that same password, it seemed to work ok.
That is why I tell people to use a fresh install, at least on the smf side so it can populate the users as they log in on the 4images side.

I hope this helps, that api fle is the main thing that links the two together. I did not create it but it works great for my site.
Buddy Duke
www.budduke.com

Offline Baphomet

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [MOD] SMF integration
« Reply #54 on: March 12, 2009, 10:39:11 AM »
Yeah that makes sense - just wanted to be sure there would be no issues before I started. Didn't get a chance to do it last night - hopefully over the weekend :) Thanks for getting back to me - and for all the work you've done on this.

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] SMF integration
« Reply #55 on: May 03, 2009, 04:24:05 PM »
Can you guys tell me if this mod is working ok with Best SEO Google MOD? I like to do the VB Bulletin... But SMF Is free.....
As long as I can finish my site before I die.

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] SMF integration
« Reply #56 on: May 03, 2009, 11:18:43 PM »
Ok, I deleted the line of code for the first error...

However now  I am recieving the error
Code: [Select]
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/lifephotography/htdocs/includes/functions.php on line 563which is

Code: [Select]
$voted=mysql_num_rows(mysql_query("SELECT image_used_ips FROM ".IMAGES_TABLE." WHERE image_used_ips LIKE '%".$ip."%' AND image_id='".$image_id."' "));
Which I cant delete as it has to do with voting......

Any idea why this doesnt work together? I am using SEO Best mod.... too if it matters....

(Sorry  I had the wrong error code up....) PLease help this kills the ajax star rating mod... I need ratings ...... and a forum!?!
« Last Edit: May 04, 2009, 05:31:13 AM by AntiNSA2 »
As long as I can finish my site before I die.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] SMF integration
« Reply #57 on: May 04, 2009, 12:14:12 AM »
Ok, I deleted the line of code for the first error...

However now  I am recieving the error
Code: [Select]
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/lifephotography/htdocs/forums/smf_api.php on line 162which is

Code: [Select]
$voted=mysql_num_rows(mysql_query("SELECT image_used_ips FROM ".IMAGES_TABLE." WHERE image_used_ips LIKE '%".$ip."%' AND image_id='".$image_id."' "));
Which I cant delete as it has to do with voting......

Any idea why this doesnt work together? I am using SEO Best mod.... too if it matters....
See reply #13 and #14 on the 1st page of this topic...
It should explain it to you...
Buddy Duke
www.budduke.com

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] SMF integration
« Reply #58 on: May 04, 2009, 05:29:46 AM »
Yes, I understand what you are saying, however I received two errors. The first error was fixed by removing the line of code... however this error is in the functions.php @
Code: [Select]

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/lifephotography/htdocs/includes/functions.php on line 563


Sorry I put up the wrong error code... that  was the old one that was corrected by removing the line of code. I will edit the post to correct it. Your help would be greatly appreceated. One more thing.... Is it not possible to enable a login prompt for them on the forum pages? As far as I see I have to put a link or something to the gallery homepage and tell them to go log in there which is not very user friendly since it is not fully integrated.


I JUST REALIZED KURT WROTE THE AJAX STAR MOD NOT V@NO!!!!!!! God I hope  I can get it to work again by unding this mods changes since I can not find the installation info for the star rating mod in googles cache!!!!!!!


Do not do this mod if you are using KURTS [Mod] Ajax Starrating for details + thumbs mod......... Unless someone knows how to fix it is will break.
« Last Edit: May 04, 2009, 06:08:13 AM by AntiNSA2 »
As long as I can finish my site before I die.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] SMF integration
« Reply #59 on: May 04, 2009, 02:57:28 PM »
Yes, I understand what you are saying, however I received two errors. The first error was fixed by removing the line of code... however this error is in the functions.php @
Code: [Select]

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/lifephotography/htdocs/includes/functions.php on line 563


Sorry I put up the wrong error code... that  was the old one that was corrected by removing the line of code. I will edit the post to correct it. Your help would be greatly appreceated. One more thing.... Is it not possible to enable a login prompt for them on the forum pages? As far as I see I have to put a link or something to the gallery homepage and tell them to go log in there which is not very user friendly since it is not fully integrated.


I JUST REALIZED KURT WROTE THE AJAX STAR MOD NOT V@NO!!!!!!! God I hope  I can get it to work again by unding this mods changes since I can not find the installation info for the star rating mod in googles cache!!!!!!!


Do not do this mod if you are using KURTS [Mod] Ajax Starrating for details + thumbs mod......... Unless someone knows how to fix it is will break.

Where can I find that mod? Ajax Starrating for details + thumbs?
I do not see it anywhere...

If you can point me in the right direction, I will see what is conflicting between the two...
Buddy Duke
www.budduke.com