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.

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

Quote:

Originally Posted by Jon_Simmonds
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

That's a feature. Just select the checkbox list as the field type :p

Jon_Simmonds 04-12-2006 10:03 PM

Quote:

Originally Posted by gio~logist
That's a feature. Just select the checkbox list as the field type :p

When I select checkbox Im only seeing the radio tick boxes on the new add screen

Gio~Logist 04-12-2006 10:17 PM

Quote:

Originally Posted by Jon_Simmonds
When I select checkbox Im only seeing the radio tick boxes on the new add screen

It gives you the ability to select multiple.

Da Drgon 04-12-2006 10:17 PM

I noticed there has been some confusion to the "rating" in the forum posts (under the post count) for some users... I think it's a good idea to rename it to "Commerce Rating" or something to that effect to avoid confusion between it and user ratings (which is enabled on some boards, but not mine)

Jon_Simmonds 04-12-2006 10:20 PM

Quote:

Originally Posted by gio~logist
It gives you the ability to select multiple.

In case the lack of sleep is affecting my ability to show what i mean, here is a example of what i mean - http://www.scism.sbu.ac.uk/tkteach/cgiteach/selbox.html

Gio~Logist 04-12-2006 11:13 PM

Quote:

Originally Posted by Jon_Simmonds
In case the lack of sleep is affecting my ability to show what i mean, here is a example of what i mean - http://www.scism.sbu.ac.uk/tkteach/cgiteach/selbox.html

That's the same as a drop down, except a different look. Is that what you meant?

Quarterbore 04-13-2006 12:31 AM

Before I hack this... Is there going to be a new main page to this that shows the last X items listed in all categories for the main page of this (ideally where X is defined in the Admin CP)?

I am starting the process of trying to figure the code out to do it myself so I figured if you were going to have this I might not invest the time...

Gio~Logist 04-13-2006 12:33 AM

Quote:

Originally Posted by Quarterbore
Before I hack this... Is there going to be a new main page to this that shows the last X items listed in all categories for the main page of this (ideally where X is defined in the Admin CP)?

I am starting the process of trying to figure the code out to do it myself so I figured if you were going to have this I might not invest the time...

The latest items are already listed on the mainpage. What exactly do you mean?

Quarterbore 04-13-2006 01:28 AM

What I am trying to do is make a home page that will show the latest classifieds in all categories on the home page. I have created a sample (please don't laugh at my "paint skills" ;) ) image that is attached.

I retained the stats of the original but I would like navigation on right or left (I showed it on the left) that allows my members to quickly go to the area they are interested in. I only think we need one "Add Advertisement Button" as when you post the advertisement you tell the script which directory it goes into. You can also see that I added an "Advanced Search" on the left... That will allow members to pick values from my custom fields (state, country, new-used, etc) and would then be used in the search criteria to limit results returned.

On the right, this is just a list of the last X classifieds... The Description text would link to the advertisement, category would link to the category the ad is from... It would be nice to be able to add more of the "custom" fields in this as well as perhaps location or ??? is important for some types of advertisements?

I have already started working on this but I am not that good at figuring out the mysql parts of code and the search strings in your little script has me quite confused..

I'll pay $100 for a page that looks like this when done (assuming you could help with the advanced seach as well...)

Oh yea, what gives with the negative times? I guess there is no "kill" for expired classifieds yet?

Gio~Logist 04-13-2006 01:52 AM

Quote:

Originally Posted by Quarterbore
What I am trying to do is make a home page that will show the latest classifieds in all categories on the home page. I have created a sample (please don't laugh at my "paint skills" ;) ) image that is attached.

I retained the stats of the original but I would like navigation on right or left (I showed it on the left) that allows my members to quickly go to the area they are interested in. I only think we need one "Add Advertisement Button" as when you post the advertisement you tell the script which directory it goes into. You can also see that I added an "Advanced Search" on the left... That will allow members to pick values from my custom fields (state, country, new-used, etc) and would then be used in the search criteria to limit results returned.

On the right, this is just a list of the last X classifieds... The Description text would link to the advertisement, category would link to the category the ad is from... It would be nice to be able to add more of the "custom" fields in this as well as perhaps location or ??? is important for some types of advertisements?

I have already started working on this but I am not that good at figuring out the mysql parts of code and the search strings in your little script has me quite confused..

I'll pay $100 for a page that looks like this when done (assuming you could help with the advanced seach as well...)

Oh yea, what gives with the negative times? I guess there is no "kill" for expired classifieds yet?

The negative times shows when the time is up. When the time is up i believe it's only viewable to admins anyways. Also, i will be able to make your page look like that. Contact me via PM for more info.

Quarterbore 04-13-2006 02:33 AM

I think we need more people to verify as I get negative times even when logged out of my site.. It shows three active ads but there are five shown and two have negative time...

http://www.timeshareforums.com/sr_cl...y&categoryid=1

Now, I have hacked my code to all heck learning how this works... I got your PM and I'll buy the premium with the upgrade as soon as you are ready to release... I have asked my members what else we would want so that I can help you improve this OR I can evaluate what I need to do on my end to customize it...

glorify 04-13-2006 04:35 AM

Quote:

Originally Posted by gio~logist
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]){

Nope--doesn't work. Still get the same error. Any other ideas? Remember, this error occurs when you are trying to save permissions of usergroups in the admincp.

Jon_Simmonds 04-13-2006 05:31 AM

Quote:

Originally Posted by gio~logist
That's the same as a drop down, except a different look. Is that what you meant?

Yeah, since these can allow for multiple choices if the multiple="multiple" option is used in the html, I may have a shot at adding it myself

Da Drgon 04-13-2006 07:05 AM

Quote:

Originally Posted by gio~logist
The negative times shows when the time is up. When the time is up i believe it's only viewable to admins anyways. Also, i will be able to make your page look like that. Contact me via PM for more info.

speaking of which, will there be a way to relist expired items to the user? or how about an "infinite" time option during initial listing?

Quarterbore 04-13-2006 10:41 AM

Quote:

Originally Posted by Da Drgon
speaking of which, will there be a way to relist expired items to the user? or how about an "infinite" time option during initial listing?

I also think we will want some method to delete the old ads and attachments, say after the ad is expired by X-days & defined in Admin CP... I would want to set them seperately in case I wanted an archive of old classified listings however....

I use Photopost pro and I have debated changing the images so that members leave the image in their member directory so it counts towards their total image limit... that way they can take care of the space issue themselves...

Gio~Logist 04-13-2006 02:14 PM

Quote:

Originally Posted by glorify
Nope--doesn't work. Still get the same error. Any other ideas? Remember, this error occurs when you are trying to save permissions of usergroups in the admincp.

Ah yes, i remember your erorr now. Like i said before, i would need ftp information or something in order to look into it due to the fact that your vb is outdated and i may just need to see if perhaps it's just that they use a different code when saving permissions and such. Also, if i remember correctly, i tried disabling the hack on your site and still got that error.

Oh and by the way, you forgot to click install :p

Gio~Logist 04-13-2006 02:15 PM

Quote:

Originally Posted by Jon_Simmonds
Yeah, since these can allow for multiple choices if the multiple="multiple" option is used in the html, I may have a shot at adding it myself

I see. What i'm saying though is that multiple choices are available when using the checkbox feature. Have you tried that?

Gio~Logist 04-13-2006 02:16 PM

Quote:

Originally Posted by Quarterbore
I also think we will want some method to delete the old ads and attachments, say after the ad is expired by X-days & defined in Admin CP... I would want to set them seperately in case I wanted an archive of old classified listings however....

I use Photopost pro and I have debated changing the images so that members leave the image in their member directory so it counts towards their total image limit... that way they can take care of the space issue themselves...

This will be looked into.

Gio~Logist 04-13-2006 05:36 PM

[high]Changelog:[/high]
4-13-06
* Security patch while editing ads (there was a little hole) All that needs to be done is reuploading sr_classifieds.php

ZIP UPDATED!!!

Gio~Logist 04-13-2006 05:46 PM

Oops. The zip didn't upload right. Fixed. Redownload if you downloaded it previous to this post.

Codeman05 04-13-2006 08:18 PM

great hack.

However, I just installed it, and all appeared to be working fine until I tried to post a new add.

I recieved this error: "Could not find phrase 'sr_classifieds_upload_failed'."

Codeman05 04-13-2006 08:20 PM

btw, this only occurs when I try to upload a pic with the ad

Codeman05 04-13-2006 08:21 PM

ok, I'm an idiot, got it working.

However, what is that phrase? I would like to add it in, just incase it needs to appear for someone else

Gio~Logist 04-13-2006 08:33 PM

Quote:

Originally Posted by Codeman05
ok, I'm an idiot, got it working.

However, what is that phrase? I would like to add it in, just incase it needs to appear for someone else


Yea i need to add that one.

Add the phrase:

varname: sr_classifieds_upload_failed
product: sr_classfieds
test: The image failed to upload.

Lea Verou 04-13-2006 09:54 PM

Oh also please include the functionality in the pro version to post as another user, so that we can transfer existing ads :)

Gio~Logist 04-13-2006 10:34 PM

Quote:

Originally Posted by Michelle
Oh also please include the functionality in the pro version to post as another user, so that we can transfer existing ads :)

Does this mean i need to add you to the list?

Lea Verou 04-13-2006 11:09 PM

I'm not sure but there is a 90% chance that I'll buy it :)
I have to know the features to ensure it meets my -quite different than most sites- needs to be 100% sure :)

Gio~Logist 04-13-2006 11:11 PM

Quote:

Originally Posted by Michelle
I'm not sure but there is a 90% chance that I'll buy it :)
I have to know the features to ensure it meets my -quite different than most sites- needs to be 100% sure :)

Indeed. I will let you know once it's out.

glorify 04-14-2006 12:48 AM

Quote:

Originally Posted by gio~logist
Ah yes, i remember your erorr now. Like i said before, i would need ftp information or something in order to look into it due to the fact that your vb is outdated and i may just need to see if perhaps it's just that they use a different code when saving permissions and such. Also, if i remember correctly, i tried disabling the hack on your site and still got that error.

Oh and by the way, you forgot to click install :p


*clicked install*


If you uninstall the hack AND remove your xml, it is fine. No probs at all. I'll send you my ftp.

Gio~Logist 04-14-2006 12:48 AM

Quote:

Originally Posted by glorify

*clicked install*


If you uninstall the hack AND remove your xml, it is fine. No probs at all. I'll send you my ftp.

Hm. Strange. Very well then, i will be taking a look. I'm sure it's just a problem with your vb version, due to the fact that no one else has had this problem. So it shouldn't be that hard to fix hopefully.


All times are GMT. The time now is 10:48 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.01799 seconds
  • Memory Usage 1,856KB
  • 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
  • (6)bbcode_code_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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