Previous Thread
Next Thread
Print Thread
Rate Thread
PhotoPost BB Code Popup
#311899 11/06/2006 6:43 PM
Joined: Jan 2003
Posts: 125
chillin Offline OP
Journeyman
OP Offline
Journeyman
Joined: Jan 2003
Posts: 125
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.

[Linked 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.

Attached Files
2291-panel.gif (51.87 KB, 140 downloads)
2297-2293-PhotoPostPanel-V0.2.zip (4.86 KB, 106 downloads)
Last edited by chillin; 11/16/2006 11:20 PM.
Sponsored Links
Re: PhotoPost BB Code Popup
chillin #311903 11/07/2006 10:56 AM
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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?

Re: PhotoPost BB Code Popup
Zarzal #311905 11/07/2006 12:11 PM
Joined: Jan 2003
Posts: 125
chillin Offline OP
Journeyman
OP Offline
Journeyman
Joined: Jan 2003
Posts: 125
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]

Re: PhotoPost BB Code Popup
chillin #311906 11/07/2006 12:46 PM
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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?

Re: PhotoPost BB Code Popup
Zarzal #311907 11/07/2006 1:10 PM
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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.

Sponsored Links
Re: PhotoPost BB Code Popup
Zarzal #311908 11/07/2006 1:52 PM
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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

Attached Files
2292-photo.gif (236 Bytes, 75 downloads)
Last edited by Zarzal; 11/07/2006 1:56 PM.
Re: PhotoPost BB Code Popup
Zarzal #311909 11/07/2006 2:02 PM
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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.

Last edited by Zarzal; 11/07/2006 3:07 PM.
Re: PhotoPost BB Code Popup
Zarzal #311911 11/07/2006 3:24 PM
Joined: Jan 2003
Posts: 125
chillin Offline OP
Journeyman
OP Offline
Journeyman
Joined: Jan 2003
Posts: 125
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?

Attached Files
2293-PhotoPostPanel-V0.2.zip (4.86 KB, 86 downloads)
Re: PhotoPost BB Code Popup
chillin #311980 11/15/2006 11:50 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
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?
Re: PhotoPost BB Code Popup
AllenAyres #311983 11/16/2006 2:11 AM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
haha, he won't up it for me, but he will for you, sad panda :x


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Sponsored Links
Re: PhotoPost BB Code Popup
Gizmo #311990 11/16/2006 11:08 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I wouldn't? Must be something you said tipsy


- Allen wavey
- What Drives You?
Re: PhotoPost BB Code Popup
AllenAyres #312017 11/16/2006 8:24 PM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
usually is wink


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: PhotoPost BB Code Popup
Gizmo #312026 11/16/2006 11:18 PM
Joined: Jan 2003
Posts: 125
chillin Offline OP
Journeyman
OP Offline
Journeyman
Joined: Jan 2003
Posts: 125
i asked very nicely.

Re: PhotoPost BB Code Popup
chillin #312586 01/09/2007 11:35 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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!

Re: PhotoPost BB Code Popup
JoshPet #312587 01/09/2007 11:55 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Re: PhotoPost BB Code Popup
chillin #313095 02/07/2007 4:50 PM
Joined: Dec 2002
Posts: 67
Power User
Offline
Power User
Joined: Dec 2002
Posts: 67
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?

Re: PhotoPost BB Code Popup
Calpy #313100 02/07/2007 9:50 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Are your server logs showing any errors?


- Allen wavey
- What Drives You?
Re: PhotoPost BB Code Popup
Calpy #313103 02/08/2007 1:25 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
And did you apply my two fixes above? I had the same problem (blank no photos) until I made those minor adjustments.

Re: PhotoPost BB Code Popup
JoshPet #313162 02/13/2007 3:37 PM
Joined: Dec 2002
Posts: 67
Power User
Offline
Power User
Joined: Dec 2002
Posts: 67
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 ] "

Attached Files
2363-calpy_photopost_prob.jpg (23.45 KB, 146 downloads)
Last edited by Calpy; 02/13/2007 3:41 PM. Reason: Added image
Re: PhotoPost BB Code Popup
chillin #316717 02/15/2008 10:41 AM
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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

Re: PhotoPost BB Code Popup
Zarzal #316721 02/15/2008 7:24 PM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
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 - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: PhotoPost BB Code Popup
Gizmo #316723 02/16/2008 5:12 AM
Joined: Feb 2004
Posts: 182
Member
Offline
Member
Joined: Feb 2004
Posts: 182
With me the update has run without problems and PhotoPost BB Code Popup functions without problems! laugh

Re: PhotoPost BB Code Popup
Micky #316725 02/17/2008 6:29 AM
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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?

Re: PhotoPost BB Code Popup
Zarzal #317002 05/18/2008 12:12 PM
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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.

Last edited by Zarzal; 05/18/2008 1:54 PM.
Re: PhotoPost BB Code Popup
Zarzal #317004 05/18/2008 2:06 PM
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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?

Re: PhotoPost BB Code Popup
Zarzal #317667 11/15/2008 2:24 PM
Joined: May 2008
Posts: 18
Newbie
Offline
Newbie
Joined: May 2008
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

Re: PhotoPost BB Code Popup
Iann128 #317679 12/01/2008 10:41 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
What popup do you mean? We have them in a Content Island, but no popups.


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Pilgrim
Pilgrim
NH, USA
Posts: 190
Joined: June 2000
Forum Statistics
Forums63
Topics37,543
Posts293,773
Members13,838
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 339
Topics Created 0
Posts Made 1
Users Online 3
Birthdays 28
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,805
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 9
isaac 8
driv 2
temp 2
Morgan 1
Top Likes Received
isaac 38
Gizmo 10
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 4
Gizmo 2
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Snapshot build 20200524.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.089s Queries: 73 (0.037s) Memory: 3.5010 MB (Peak: 3.8435 MB) Data Comp: Zlib Server Time: 2020-05-28 23:46:41 UTC
Valid HTML 5 and Valid CSS