vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Social Group and Album Enhancements - Watermark Generator (https://vborg.vbsupport.ru/showthread.php?t=263804)

Disasterpiece 05-22-2011 01:53 PM

Quote:

Originally Posted by BaanFarsang (Post 2198595)
Problems on VB4 which installed of vB Optimise, all cache flushed too.

Hi

Can you elaborate how the problem shows itself?

Do you see no watermark, do the attachment images appear or not?

Does the admincp settings page show any warnings or errors?

Do you see the sample image with watermark on it? It should appear in the admincp plugin's settings at the bottom of the page.
Quote:

Originally Posted by Stefan118 (Post 2198628)
haven't tried it, but maybe you have to set your cache directory to 777 (writable)
I did that at forehand, and it works on my vB 4.1.3

Right, the cache directory must be writable (CHMOD 777), however the admincp displays a warning if the cache dir is not writable :)
Quote:

Originally Posted by BadgerDog (Post 2198631)
Hi ... :)

Ok, the output is an SQL error. For security and privacy, I have replaced our site name with xxxx's.



The SQL error doesn't appear when I run the "Preview" or try to view the same attachment with the mod's code, just run I run your special testattachments.php program.

By the way, I have re-installed the mod twice just in case something went wrong with the original install.

Does this help?

Regards,
Doug

Yes, apparently the settings table for the plugin doesn't exist. This is odd, maybe there was a problem with the install process? did you see any warnings displayed while installing the addon?
I'll make it more verbose in regards of errors in the next version.

Please check manually if the table exists in your database. I assume that your mysql user hasn't enough permissions to create a table. So you have to create the table manually.

To do so, go to your mysql administrative system (like phpmyadmin) and run these sqls, but only run them if and ONLY if the table doesn't exist yet:
Code:

CREATE TABLE `{TABLE_PREFIX}plwmsettings` (
`varname` VARCHAR( 100 ) NOT NULL ,
`value` MEDIUMTEXT NULL ,
`defaultvalue` MEDIUMTEXT NULL
) ENGINE = MYISAM

Code:

ALTER TABLE `{TABLE_PREFIX}plwmsettings` ADD PRIMARY KEY ( `varname` )
Code:

INSERT INTO `{TABLE_PREFIX}plwmsettings` (
`varname` ,
`value` ,
`defaultvalue`
)
VALUES (
'plwm_cache_basedir', NULL , NULL
), (
'plwm_cache_lifetime', '604800', '604800'
), (
'plwm_watermark_method', 'text', 'text'
), (
'plwm_watermark_path', 'path/to/watermark.png', 'path/to/watermark.png'
), (
'plwm_watermark_text', 'Don''t steal plz!', 'Don''t steal plz!'
), (
'plwm_watermark_font', '3', '3'
), (
'plwm_watermark_ttf', 'path/to/customfont.ttf', 'path/to/customfont.ttf'
), (
'plwm_watermark_size', '10', '10'
), (
'plwm_watermark_color', '#ABE7F4', '#ABE7F4'
), (
'plwm_watermark_shadecolor', '#000000', '#000000'
), (
'plwm_watermark_alpha', '45', '45'
), (
'plwm_watermark_attid', '0', '0'
), (
'plwm_watermark_posinfo', '3,10,10', '3,10,10'
), (
'plwm_lru_max_entries', '50', '50'
), (
'plwm_watermark_quality', '80', '80'
), (
'plwm_watermark_minpicsize', '200', '200'
);

(replace {TABLE_PREFIX} with your according vb table prefix)

BadgerDog 05-22-2011 03:56 PM

Quote:

Originally Posted by Disasterpiece (Post 2198702)
Yes, apparently the settings table for the plugin doesn't exist. This is odd, maybe there was a problem with the install process? did you see any warnings displayed while installing the addon?
I'll make it more verbose in regards of errors in the next version.

Please check manually if the table exists in your database. I assume that your mysql user hasn't enough permissions to create a table. So you have to create the table manually.

Sorry, you're way past my skillset .. :( :D

I did uninstall and re-install, but still have the same problem.

I don't know why I wouldn't have permissions to add a table, as I've added dozens of mods that have tables to the sql databse and never had a problem. :confused:

Regards,
Doug

Disasterpiece 05-22-2011 09:12 PM

Do you have access to a database administration tool by your hoster for example?
If not, I'd suggest to ask them for assistance.

It's important to find out why the script doesn't find the table. If it doesn't exist, it's easy to create it with these mentioned sql queries.

BadgerDog 05-22-2011 10:58 PM

1 Attachment(s)
Quote:

Originally Posted by Disasterpiece (Post 2198855)
Do you have access to a database administration tool by your hoster for example?
If not, I'd suggest to ask them for assistance.

It's important to find out why the script doesn't find the table. If it doesn't exist, it's easy to create it with these mentioned sql queries.

I have phpmyadmin installed and I can see both our live and development databases in it, but fear of wiping out our site keeps me from using it. :D

Regards,
Doug

Edit: I viewed the devforum database in phpmyadmin and I see this list in the attached pic. I don't see any table starting with "plw", so can I assume it doesn't exist?

demo7up 05-23-2011 02:49 PM

1 Attachment(s)
This does not work at all for me i have verified directories, i do see my watermark images in the settings but thats all .... nothing gets watermarked

my attachment images just display the spinning loading symbol?

Disasterpiece 05-23-2011 06:32 PM

1 Attachment(s)
Quote:

Originally Posted by BadgerDog (Post 2198886)
I have phpmyadmin installed and I can see both our live and development databases in it, but fear of wiping out our site keeps me from using it. :D

Regards,
Doug

Edit: I viewed the devforum database in phpmyadmin and I see this list in the attached pic. I don't see any table starting with "plw", so can I assume it doesn't exist?

Hm, seems like it really doesn't exist.
Might be an issue with the fact that you don't use any table prefix, but I'm not sure.

However, execute the 3 queries I posted above, removing the {TABLE_PREFIX} part completely and tell me if it helped. (Make backups before running those queries), you can do that in the phpmyadmin via tab "SQL" or in the vb admincp, given that your userid is defined in the according config.php entry allowing to run sql queries.

Quote:

Originally Posted by demo7up@gmail.c (Post 2199106)
This does not work at all for me i have verified directories, i do see my watermark images in the settings but thats all .... nothing gets watermarked

my attachment images just display the spinning loading symbol?

Do you use any other mods which hook into any kind of attachment or album functions?

Please upload the testattachments.php file into your vbulletin root file, navigate to the file via browser, add a ?i1=13 to the url that it looks like:
Code:

http://myforumurl.com/forum/testattachments.php?i1=13
Where 13 is the id from any image attachment which is big enough for the watermark to get applied.
You can see the id of any attachment image by opening the file (rightclick -> Show image) and reading the id from the url.

If all runs smoothly, the script should answer with:
Quote:

Watermark system finished
Script end.
If any errors occur, you should get them displayed.

This is the only way to display php warnings/errors, because the standard attachment system has them disabled completely.

BadgerDog 05-24-2011 11:34 AM

Quote:

Originally Posted by Disasterpiece (Post 2199201)
H
However, execute the 3 queries I posted above, removing the {TABLE_PREFIX} part completely and tell me if it helped. (Make backups before running those queries), you can do that in the phpmyadmin via tab "SQL" or in the vb admincp, given that your userid is defined in the according config.php entry allowing to run sql queries.

You mean wherever the phrase {TABLE_PREFIX} appears in your sql commands, remove it?

Regards,
Doug

Disasterpiece 05-24-2011 11:49 AM

yes.

Normally you'd replace it with your table prefix, like "vb4_" for example so the correct table name gets created, but since you don't use table prefixes for your vbulletin tables, just the table name would be the correct name convention.

.

BadgerDog 05-24-2011 12:11 PM

1 Attachment(s)
Quote:

Originally Posted by Disasterpiece (Post 2199429)
yes.

Normally you'd replace it with your table prefix, like "vb4_" for example so the correct table name gets created, but since you don't use table prefixes for your vbulletin tables, just the table name would be the correct name convention.

.

Ok, crossed my fingers and executed the three sql command sequences above, removing the {TABLE_PREFIX} thing :D

I now have a table in the database and nothing seemed to blow up. (see pic)

However, when I run preview or look at attachments, no watermark shows. In preview, I still don't see demo pic. :confused:

Regards,
Doug

Disasterpiece 05-24-2011 01:28 PM

Looks good to me.

I updated the test script yesterday so it should be more verbose now. Download it from her: https://vborg.vbsupport.ru/showpost....1&postcount=36
Put it into your root dir and navigate to the script, adding ?i1=*number* to the url where *number* is the id from an image where the watermark should appear.


All times are GMT. The time now is 09:29 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01251 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete