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: 807
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: 807
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: 807
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: 807
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: 807
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 Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25461
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 Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

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

Registered: 03/10/00
Posts: 25461
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 Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

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 Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25461
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: 807
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
Page 1 of 2 1 2 >


Moderator:  sirdude 
Who's Online
0 registered (), 29 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Displaying a gif for a paying member
by Iann128
Today at 07:04 AM
Restore The "New Topic Is Highlighted" Feature
by hikelite
01/02/09 07:41 PM
Web Hosting
by Pilgrim
01/02/09 04:13 PM
Finishing touches on a UBB migration
by AllenAyres
01/02/09 03:04 PM
Sidebar options?
by Pilgrim
12/26/08 03:40 PM
Legacy Style
by sirdude
12/24/08 07:18 PM
ubb.social
by Placebo
12/21/08 07:30 AM
New Mods
Displaying a gif for a paying member
by Iann128
12/29/08 11:44 AM
Legacy Style
by Micky
12/21/08 01:36 PM
ubb.social
by
08/03/06 10:38 AM
Newest Members
bluedthunder, blaqskreen, RAICHU, sebak, BaronDriver
13371 Registered Users
Top Posters
AllenAyres 25461
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks