php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#311899 - 11/06/06 05:43 PM PhotoPost BB Code Popup
chillin Offline
Journeyman

Registered: 01/26/03
Posts: 127
Loc: bend, OR USA
PhotoPost Popup
This was an old 6.x mod that myself, JustDave, and Omegatron had all worked on at some point in time.

It essentially add's a button to the rich text editor panel (that shows in all post/reply windows) which launches a pop-up panel with a user's photos that are in PhotoPost.

Once a photo is clicked, bbcode is placed in the post window to link the image.



Modified Files
/ubb_js/standard_text_editor.js
/templates/standard_text_editor.tpl

New Files
/scripts/photopost.inc.php
/templates/photopost.tpl
/languages/photopost.php

Requirements
UBB 7 and Photopost

Instructions
Follow the text file inside the zip.

Updated
Attached proper zip with bug fixes.


Attachments
2291-panel.gif (140 downloads)
2297-2293-PhotoPostPanel-V0.2.zip (106 downloads)



Edited by chillin (11/16/06 10:20 PM)
_________________________
i see threads people
http://www.chinooktc.com

Top
#311903 - 11/07/06 09:56 AM Re: PhotoPost BB Code Popup [Re: chillin]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 811
Loc: Berlin, Germany
I need help smile I follow your instructions. Seems to be simpel but it dont work.
I get the extra tab in the editor but click to it bring only an error in the java console and no popup window:

error: x is not a function
error: openPhotoPanel is not defined

Maybe there is missing a file in your archive or missing instructions?
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#311905 - 11/07/06 11:11 AM Re: PhotoPost BB Code Popup [Re: Zarzal]
chillin Offline
Journeyman

Registered: 01/26/03
Posts: 127
Loc: bend, OR USA
Sorry about that. I left out this step in standard_text_editor.tpl

Around Line 14 find this
Code:
var enterImage = "{$lang.ENTERIMAGE}";
var enterItem = "{$lang.ENTERITEM}";
{literal}


ADD BELOW

Code:
function openPhotoPanel() {
	photoWindow=window.open('ubbthreads.php?ubb=photopost','photopanel','scrollbars=yes,resizable=yes,width=500,height=600');
	if (photoWindow.opener == null) photoWindow.opener = self;
}


I'll update the instructions and upload the zip again.[i][/i]
_________________________
i see threads people
http://www.chinooktc.com

Top
#311906 - 11/07/06 11:46 AM Re: PhotoPost BB Code Popup [Re: chillin]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 811
Loc: Berlin, Germany
ok, this brings up the popup window. It shows the correct layout and the buttons work, but I see no photos from my user. I setup photopost.inc.php as it should.

Only one thing is unclear. You put this code in it:
$pp_url="http://www.mysite.com/photopost/"; //url to photopost install NO trailing slash

You say NO slash but put it yourself at the end. I try both version with my own url but see no images. I dont get any error message so I be connected to the database. Any clues?
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#311907 - 11/07/06 12:10 PM Re: PhotoPost BB Code Popup [Re: Zarzal]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 811
Loc: Berlin, Germany
found another little problem, but this doesnt solve my main problem. In photopost.tpl is a hardcoded path, I use an other path to my board. I change it for me.
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#311908 - 11/07/06 12:52 PM Re: PhotoPost BB Code Popup [Re: Zarzal]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 811
Loc: Berlin, Germany
ah, got it. I use a table prefix 'pp_' and this is need in front of 'photos'. Please add a config option for the prefix to in photopost.inc.php

I like to share an propper icon too


Attachments
2292-photo.gif




Edited by Zarzal (11/07/06 12:56 PM)
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#311909 - 11/07/06 01:02 PM Re: PhotoPost BB Code Popup [Re: Zarzal]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 811
Loc: Berlin, Germany
Next problem. The pagnation dont work. Seems to hardcodet to work with you board:

//Pagnation
$totalphotos = get_photo_total($user_id);
$TotalP = ceil($totalphotos / $pp_images);
$pages = $html->paginate($page,$TotalP,"tripreports{$var_sep}sb{$var_eq}$sb{$var_sep}sk{$var_eq}$sk{$var_sep}page{$var_eq}");

The result is an unuseable link like this:
http://www.dragonclan-forum.de/board/ubbthreads.php/ubb/tripreports/sb//sk//page/2

/edit: replace tripreports with photopost and it work as it should. Finished, well done.


Edited by Zarzal (11/07/06 02:07 PM)
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#311911 - 11/07/06 02:24 PM Re: PhotoPost BB Code Popup [Re: Zarzal]
chillin Offline
Journeyman

Registered: 01/26/03
Posts: 127
Loc: bend, OR USA
Well, since I can't edit my original post, here is an updated zip file with all of zarzal's changes.

Allen/Admins... can we modify edit time in the Mod forums so we can update our original install files?


Attachments
2293-PhotoPostPanel-V0.2.zip (86 downloads)

_________________________
i see threads people
http://www.chinooktc.com

Top
#311980 - 11/15/06 10:50 PM Re: PhotoPost BB Code Popup [Re: chillin]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
I upped the limit to something like 100k hours - need to write something to disable edit times for certain forums smile

Nice mod, some great images on your site smile
_________________________
- Allen wavey
- What Drives You?

Top
#311983 - 11/16/06 01:11 AM Re: PhotoPost BB Code Popup [Re: AllenAyres]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
haha, he won't up it for me, but he will for you, sad panda :x
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#311990 - 11/16/06 10:08 AM Re: PhotoPost BB Code Popup [Re: Gizmo]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
I wouldn't? Must be something you said tipsy
_________________________
- Allen wavey
- What Drives You?

Top
#312017 - 11/16/06 07:24 PM Re: PhotoPost BB Code Popup [Re: AllenAyres]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
usually is wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312026 - 11/16/06 10:18 PM Re: PhotoPost BB Code Popup [Re: Gizmo]
chillin Offline
Journeyman

Registered: 01/26/03
Posts: 127
Loc: bend, OR USA
i asked very nicely.
_________________________
i see threads people
http://www.chinooktc.com

Top
#312586 - 01/09/07 10:35 PM Re: PhotoPost BB Code Popup [Re: chillin]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Nice. One thing I noticed, $pp_prefix needs to be included in the global call of the functions or else the query doesn't see your table prefix. Thanks!
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#312587 - 01/09/07 10:55 PM Re: PhotoPost BB Code Popup [Re: JoshPet]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
One more issue I noticed, in the photopost.tpl file, the URL to the javascript include is hardcoded with a ubb7 directory name, so clicking the image doesn't find the updatePost function until you fix this url.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#313095 - 02/07/07 03:50 PM Re: PhotoPost BB Code Popup [Re: chillin]
Calpy Offline
Power User

Registered: 12/17/02
Posts: 71
Thanks! Quick note, in the v 0.2 zip file photopost.inc.php, localhost is misspelled on line 12.
Now, for me (running UBBT 7.1b5) it opens a window that says "My PhotoPost Pictures", but there are no pics displayed, just the heading and then the two buttons at the bottom. When I go directly to my photopost install, I am logged in and have pix in my gallery. Any thoughts on why it's not finding any pix?

Top
#313100 - 02/07/07 08:50 PM Re: PhotoPost BB Code Popup [Re: Calpy]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Are your server logs showing any errors?
_________________________
- Allen wavey
- What Drives You?

Top
#313103 - 02/08/07 12:25 AM Re: PhotoPost BB Code Popup [Re: Calpy]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
And did you apply my two fixes above? I had the same problem (blank no photos) until I made those minor adjustments.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#313162 - 02/13/07 02:37 PM Re: PhotoPost BB Code Popup [Re: JoshPet]
Calpy Offline
Power User

Registered: 12/17/02
Posts: 71
Originally Posted By: JoshPet
And did you apply my two fixes above? I had the same problem (blank no photos) until I made those minor adjustments.

Hi Josh, I did the javascript/URL fix just now. The $pp_prefix already seems to be in the v.2 zip file version of photopost.inc.php, and as a test I just hard coded "pp_photos" in place of the two occurrences of the variable in the page as well, but still just a popup with some options but no photos.
Allen, my server error log is empty... which is actually kinda weird, considering I must have some broken image links or something somewhere in my thousands of pages.
"Error Log
Last 300 Error Log Messages in reverse order:



[ Go Back ] "


Attachments
2363-calpy_photopost_prob.jpg




Edited by Calpy (02/13/07 02:41 PM)
Edit Reason: Added image

Top
#316717 - 02/15/08 09:41 AM Re: PhotoPost BB Code Popup [Re: chillin]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 811
Loc: Berlin, Germany
This need an update to work with 7.3
After I take a look to the beta4 code I see changes in templates/default/standart_text_editor.tpl and /ubb_js/standard_text_editor.js that need to review by someone. The way javascript is handled was changed a little bit.

Anyone have time to do it? This is one of two things that stopped me right now to bring my page on 7.3
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#316721 - 02/15/08 06:24 PM Re: PhotoPost BB Code Popup [Re: Zarzal]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
If i had a copy of PhotoPost to work with I'd gladly give it a shot; but unfortunately I prefer Gallery as it's free wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#316723 - 02/16/08 04:12 AM Re: PhotoPost BB Code Popup [Re: Gizmo]
Micky Offline
Member

Registered: 02/11/04
Posts: 184
Loc: Bern, Switzerland
With me the update has run without problems and PhotoPost BB Code Popup functions without problems! laugh
_________________________
Gruss Micky

Golf Diesel Forum

Top
#316725 - 02/17/08 05:29 AM Re: PhotoPost BB Code Popup [Re: Micky]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 811
Loc: Berlin, Germany
ok. Sounds fine. I will see if 7.3 ist released. Do you encounter the same problem as Moers here?
http://www.ubbcentral.com/forums/ubbthreads.php/topics/206547.html

He say that he only can upload pictures as admin. Do you can test it and report back in the thread?
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#317002 - 05/18/08 12:12 PM Re: PhotoPost BB Code Popup [Re: Zarzal]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 811
Loc: Berlin, Germany
It dont work anymore with 7.3 release. I get permission errors. Anyone use it successfully with 7.3 final version?

If I try in my browser a direct call with ubbthreads.php?ubb=photopost it work but If I click the icon in the editor I get a permission error.

It would also very nice to include it in the picture button dropdown of the editor.


Edited by Zarzal (05/18/08 01:54 PM)
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#317004 - 05/18/08 02:06 PM Re: PhotoPost BB Code Popup [Re: Zarzal]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 811
Loc: Berlin, Germany
I found the problem. In /templates/default/standard_text_editor.tpl is the following code:
Code:
{literal}
function openPhotoPanel() {
	photoWindow=window.open('ubbthreads.php?ubb=photopost','photopanel','scrollbars=yes,resizable=yes,width=500,height=600');
	if (photoWindow.opener == null) photoWindow.opener = self;
}
{/literal}
The problem: there iss missing the base dir in front of ubbthreads.php?ubb=photopost. For a workaround I hardcode it for me like this: /board/ubbthreads.php?ubb=photopost
This work.
But what ist the propper way to enter it inside a function? I try {$config.BASE_URL}/ubbthreads.php?ubb=photopost but this dont work. Who can help?
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#317667 - 11/15/08 01:24 PM Re: PhotoPost BB Code Popup [Re: Zarzal]
Iann128 Offline
Newbie

Registered: 05/31/08
Posts: 18
I just installed Photopost on my testing site (ubb v7.4.1) and am getting the popup window with no pictures in it as well.. I have tried the fixes above and can not seem to figure it out.

Allen I have checked out your site and love the way you have it working, that is one of the reasons we bought Photopost.

The site I am trying to get it working on is http://testing.firstgenmc.com/ubbthreads

Thanks,

Ian

Top
#317679 - 12/01/08 09:41 AM Re: PhotoPost BB Code Popup [Re: Iann128]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
What popup do you mean? We have them in a Content Island, but no popups.
_________________________
- Allen wavey
- What Drives You?

Top
Page 1 of 2 1 2 >



Moderator:  sirdude 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks