Optimised Scriptaculous Module with Thickbox

Register an Account
Reply
 
Thread Tools Display Modes
  #21 (permalink)  
Old 05-23-2007, 03:59 PM
inet's Avatar
New Pligger
 
Join Date: Dec 2006
Location: UK
Posts: 27
Quote:
Originally Posted by Simon View Post
Attached below is the updated thickbox login code, using the modified scriptaculous module. Please follow all the instructions carefully if you intend to install it, and remember to remove ALL previous thickbox code if you already have it installed.

A demo can be found here, and the old thread on this mod can be found here.
6.) To activate a thickbox login box, place a login link on your page with the following format:

<a title="Login to Continue" href="javascript://" onclick="TB_show('Login to Continue','{$my_pligg_base}/login_box.php?return=<?php echo $_SERVER['REQUEST_URI']; ?>&amp;height=170&amp;width=250',null);">Login</a>

Not sure where to put this, am using the yget template. Please advice, thanks
Reply With Quote
  #22 (permalink)  
Old 05-31-2007, 04:18 PM
Genghis's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
First, thank you Simon for putting so much of your time and hard-work into this much needed mod. The community owes you...

I am, however, having some issues with the VIDEO mod on my site after installation. I'm hoping you can point me in the right direction as I think there's just some kind of syntax error, perhaps? At any rate here is my system background/history and the steps I followed, along with the problem:

1. Running Pligg 9.5 [yget template] w/ the newest Security Update from AshDigg. NOTE: I have my submit.php file modified to allow anonymous submissions.

2. Uninstalled the old (non-optimized) scriptaculous pack from the admin config area and also removed its files from my server. NOTE: I still have Image Upload Mod 0.4 installed and running on the server.

3. Installed the new (optimized) scriptaculous pack. Then I followed all the rest of your install instructions for the VIDEO mod.

The Issues I'm Having:

1. When clicking on an image thumb on the main page, the ajax loads the picture as it should. Great! But, when clicking on the image in the "discussion page," the transparent gray background loads, but no visible image comes up.

2. When trying to submit a news story to the site (Submit Step 2), the page displays all the right things, but with the following errors at the top of the page:

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 'discard', '0', 3921979, 0, FROM_UNIXTIME(1180637784), FROM_UNIXTIME(0), 0, 1)' at line 1 in /home/flooz3/public_html/libs/db.php on line 206

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 in /home/flooz3/public_html/libs/db.php on line 206


I'm pretty desperate here...and I can't quite put my finger on the issue at hand. Any of your fellas help would mean a lot. Thanks...

I'm attaching the relevant files below:

P.S. I can PM you a link to the test site.
Attached Files
File Type: php link.php (32.8 KB, 158 views)
File Type: php submit.php (9.7 KB, 179 views)
File Type: tpl link_summary.tpl (13.7 KB, 122 views)
Reply With Quote
  #23 (permalink)  
Old 05-31-2007, 04:47 PM
Genghis's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
Update:

I've reverted back to the original Pligg 9.5 Submit.php file (for non-anonymous submissions) and all the same problems still persist. So that was not the culprit...

Also, I've got a question. In your install instructions for the VIDEO mod you have the following written:

Code:
2.) Edit the submit_empty_submit_form.tpl (example template below):

<fieldset><legend>{#PLIGG_Visual_Submit1_NewsSource#}</legend>
	<form action="{$URL_submit}" method="post" id="thisform">
		<table border="0">
		<tr><td><label for="url">Source URL:</label></td></tr>
		<tr><td><input type="text" name="url" id="url" value="http://" size="55" class="form-full" /></td></tr>
		<tr><td><input type="radio" name="story_type" value="0" checked /> Article &nbsp;&nbsp;<input type="radio" name="story_type" value="1" /> Video</td></tr>
		<tr><td><input type="submit" value="Submit Story" /></td></tr>
		</table>
		<input type="hidden" name="phase" value="1" />
		<input type="hidden" name="randkey" value="{$submit_rand}" />
		<input type="hidden" name="id" value="c_1" />
	</form>
	<br />
	{if $Submit_Require_A_URL neq 1}{#PLIGG_Visual_Submit_Editorial#}{/if}
</fieldset>
What do you mean by "submit_empty_submit_form.tp.l" I just replaced the above code with the original code that is found in the submit_step_1.tpl file. I presume I did the right thing...or not?
Reply With Quote
  #24 (permalink)  
Old 05-31-2007, 05:11 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 537
Yes that's correct. The template structure changed recently, and the "empty form" template was removed it seems.

The most likely cause for the mysql error is a syntax one. I had a quick look over the files but couldn't find anything that stood out. I'll have a closer look later.
Reply With Quote
  #25 (permalink)  
Old 05-31-2007, 06:42 PM
Genghis's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
K. Good to hear. I'll sit tight....
Reply With Quote
  #26 (permalink)  
Old 06-01-2007, 02:50 PM
Genghis's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
Update 2:

Okay, So I've uninstalled and then reinstalled the Image Upload Module and made sure the syntax was all right in my files on my server. Result: No difference in errors, etc.

I uninstalled and then reinstalled the embed video module. Result: No difference in errors, etc.

The stand-alone Thickbox module that was never installed on my server, as I already had Simon's "Optimized Scriptaculous pack" installed... well I installed it on top of Simon's mod just to see. Result: No difference in errors, etc.

Is anyone else getting the same problems. I wonder if anyone is getting the same issue when clicking on a picture thumb in story.php....
Reply With Quote
  #27 (permalink)  
Old 06-01-2007, 03:01 PM
not2serious's Avatar
Pligg Donor
Pligg Version: 1.1.5
Pligg Template: Westie
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 229
I know that Cent is working on an update for the image upload module:

Image Upload Module: After admin edit
Reply With Quote
  #28 (permalink)  
Old 06-01-2007, 03:25 PM
Genghis's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
Serious, thanks for the reply. I've aware of cent's progress...he's been in contact with me via PM. I don't believe, however, that the two are related. He's working on update for the admin edit function for those stories that have an image attached to them.


I'm hoping Simon can give me a helping hand here....
Reply With Quote
  #29 (permalink)  
Old 06-02-2007, 03:12 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 537
Quote:
Originally Posted by Genghis View Post
I'm hoping Simon can give me a helping hand here....
I won't be able to look at it more closely until Tuesday at the earliest. But as far as the error goes, is any information still recorded in the database upon submission?
Reply With Quote
  #30 (permalink)  
Old 06-02-2007, 04:29 PM
Genghis's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
Update 3:

Good news. I've gotten the errors to go away completely. The issue was with my link.php file found in root/libs/.

I followed your "recommended" instructions from Step 4 of the VIDEO mod and just added the link_type paths directly into the code.

I believe the errors occurred when I replaced the code in full blocks. So my recommendation for those people who are running on Pligg 9.5 Beta, is to add the link_type code line-by-line rather then to copy and paste it in full blocks from the instructions.

I've included a copy of my updated link.php file below for those who may be having the same problems or are too lazy to replace it themselves.

On an additional note: I am still having issues with thickbox for images. Sometimes they are displayed, other times they are not. And when looking at story.php, the image does not load at all (just the shaded screen). I believe the problem lies with the modified prototype.js file and it may be some kind of caching issue as well because I'm getting this error in firebug:

Code:
Scriptaculous_init is not defined
[Break on this error] Scriptaculous_init();
showthread.php (line 2157)
channel.securityInfo has no properties
[Break on this error] var cert =
nsExtensionManage... (line 192)
channel.securityInfo has no properties
[Break on this error] var cert =
nsUpdateService.j... (line 103)
GET http://forums.pligg.com/mint/pepper/andrewsutherland/outclicks/data.php?outclick=http%3A%2F%2Fforums.pligg.com%2Fattachment.php%3Fattachmentid%3D714%26d%3D1180803887&from_title=Pligg%20Forum%20-%20View%20Single%20Post%20-%20Simple%20Static%20Page%20Support...&from=http%3A%2F%2Fforums.pligg.com%2Fshowpost.php%3Fp%3D30857%26postcount%3D3404 (341ms)mint (line 229)
Scriptaculous_init is not defined
[Break on this error] Scriptaculous_init();
showthread.php (line 4203)
Scriptaculous_init is not defined
[Break on this error]
newreply.php (line 1647)
Scriptaculous_init is not defined
[Break on this error] Scriptaculous_init();
showthread.php (line 4203)
Scriptaculous_init is not defined
[Break on this error] Scriptaculous_init();
showthread.php (line 4371)
Scriptaculous_init is not defined
[Break on this error] Scriptaculous_init();
showthread.php (line 4182)
Scriptaculous_init is not defined
[Break on this error]
newreply.php (line 1647)
TB_WIDTH is not defined
TB_position()prototype.js (line 8)
[Break on this error] eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a...
prototype.js (line 8)
I don't know how to resolve the above error, as I am no coder...but it would be great if you could look at this yourself.
If anyone is getting the same error in Pligg 9.5 Beta...please let us know. Thanks!
Attached Files
File Type: php link.php (33.1 KB, 234 views)
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload Module (File and Image Attachment) Yankidank Free Modules 268 02-03-2012 12:19 PM
Fixes to Profile Extra Fields Module v0.2 and Extended Profile Module v0.1 redwine Questions and Comments 11 12-20-2010 04:18 PM
Help Installing Thickbox for Upload module aguillen Questions and Comments 1 06-26-2009 02:19 AM
[MOD] Thickbox Module for Pligg cent Questions and Comments 35 11-19-2008 10:54 AM
Lightbox Thickbox Scriptaculous jbquery revolver Questions and Comments 3 04-18-2007 01:54 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development