vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - SR Classifieds 1.0.2 Light (https://vborg.vbsupport.ru/showthread.php?t=112504)

tfw2005 04-12-2006 03:16 PM

Hey guys,

In case anyone else has the full sized images not showing up CHMOD 600 issue ...

In functions_sr_classifieds_upload.php there is a line saying:

Code:

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
change that to

Code:

if (copy($_FILES['userfile']['tmp_name'], $uploadfile)) {
And files will upload with proper CHMODDING, and show up in the listings.

Apparently this is a result of the version of PHP and the variables set in your PHP.ini. Makes sense because none of the scripts similar to this i've run use the move_file command, all used the copy. Hence my WTF hair pulling yesterday. I didnt even want to begin messing with my server wide or site wide settings, but this worked, so Im good.

Hopefully anyone else experiencing this down the road can use this.

Gehanna 04-12-2006 03:28 PM

I hate to be a spaz but when doing the template edits, I use the search in template feature to find:

$vbphrase[posts]: $post[posts] <br>

Unfortunately I get that it is not found in either the postbit or postbit_legacy template. As a result I don't know where to add:

<if condition="$post['userid'] AND $vboptions[sr_classifieds_active] == '1'">
<div>$vbphrase[sr_classifieds_rating] $post[sr_classifieds_pcnt]% <a href="sr_classifieds.php?do=user&userid=$post[userid]">($post[sr_classifieds_score])</a></div>
</if>

Can anyone suggest a solution?

ps- I have version 3.5.4

Thanks,
Gehanna

Quarterbore 04-12-2006 03:33 PM

Quote:

Originally Posted by Gehanna
I hate to be a spaz but when doing the template edits, I use the search in template feature to find:

$vbphrase[posts]: $post[posts] <br>

Unfortunately I get that it is not found in either the postbit or postbit_legacy template. As a result I don't know where to add:

<if condition="$post['userid'] AND $vboptions[sr_classifieds_active] == '1'">
<div>$vbphrase[sr_classifieds_rating] $post[sr_classifieds_pcnt]% <a href="sr_classifieds.php?do=user&userid=$post[userid]">($post[sr_classifieds_score])</a></div>
</if>

Can anyone suggest a solution?

ps- I have version 3.5.4

Thanks,
Gehanna

Yea, the <br> is not in the original template...

Try looking for this:

$vbphrase[posts]: $post[posts]

I posted this earlier in the thread but I guess it wasn't updated... remember to add the <br> before the code you are adding or it will be on the same line.

Gehanna 04-12-2006 03:38 PM

Hello Quarterbore :D

I just found this in postbit_legacy:

<div>
$vbphrase[posts]: $post[posts]
</div>

I assume that is what I am looking for but let me ask you this. Because the </div> is present, will I still need to add the <br> before the code?

Thanks Much for your reply by the way.

Sincerely,
Gehanna

EDIT TO ADD -- Nevermind. I discovered that it is not necessary to add the <br> provided the </div> is there.

Jon_Simmonds 04-12-2006 07:18 PM

Id also like to see a selection box option for the additional fields, were users can select additonal terms, as opposed to the radio box list, and if a search function could be made to search the items that are selected in the selection box that would be grand

Loving this so far :D

Quarterbore 04-12-2006 08:12 PM

I just noticed that this does not seem to have any limits on file or image size yet and that the image display is just a reduced version of the image uploaded to the server... It is pretty important that the users can not upload huge images so I would suggest a maximum file (memory or height/width) size check be incorporated in the CP at some point...

klinsek 04-12-2006 08:23 PM

Got to page 13 and didn't see anyone cover this error...

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /includes/class_core.php on line 635

Any ideas?

Gio~Logist 04-12-2006 09:46 PM

Quote:

Originally Posted by Gehanna
Hello Quarterbore :D

I just found this in postbit_legacy:

<div>
$vbphrase[posts]: $post[posts]
</div>

I assume that is what I am looking for but let me ask you this. Because the </div> is present, will I still need to add the <br> before the code?

Thanks Much for your reply by the way.

Sincerely,
Gehanna

EDIT TO ADD -- Nevermind. I discovered that it is not necessary to add the <br> provided the </div> is there.

Yes, that's it.

Gio~Logist 04-12-2006 09:48 PM

Quote:

Originally Posted by klinsek
Got to page 13 and didn't see anyone cover this error...

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /includes/class_core.php on line 635

Any ideas?

I believe it's because of the vb version. Try editing sr_classifieds.php and search for:
Code:

        if($permissions['sr_classifieds'] & $vbulletin->bf_ugp['sr_classifieds']['canedit'] OR $bbuserinfo[userid] == $user[userid]){
Change that to:

Code:

        if($permissions['sr_classifieds'] & $vbulletin->bf_ugp['sr_classifieds']['canedit'] OR $vbulletin->userinfo[userid] == $user[userid]){

Gio~Logist 04-12-2006 09:49 PM

Quote:

Originally Posted by Quarterbore
I just noticed that this does not seem to have any limits on file or image size yet and that the image display is just a reduced version of the image uploaded to the server... It is pretty important that the users can not upload huge images so I would suggest a maximum file (memory or height/width) size check be incorporated in the CP at some point...

Hm. Yes, a maximum file size will be nice. Let me add that to the list of things to do.


All times are GMT. The time now is 03:51 AM.

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.01889 seconds
  • Memory Usage 1,751KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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