Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Some questions about images, avatars and smilies

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
radiodelicate Posted - 07 July 2008 : 10:29:39
Hi!
I recently joined, but have been lurking for months. I cannot even begin to say how much help I've had of these forums, so I'd just like to say thanks for that to begin with.

Now, I have a couple of questions/requests about MODs. I've done my best trying to search for them, but haven't been able to find any satisfying results.

1. Is it possible to just allow images in a certain part of the forum? FIXED!
I've turned images off in my forum as it is now, since I do not want the topics to be cluttered with images and take too long time to load. I have however a part of the forum where the members are encouraged to post links to their photographs, artworks and so on. I would love it if it was possible to allow images just for this specific forum, while images still stay turned off in the other parts.

2. Simple avatars
I like the possibility for my users to use avatars, but I'm not particularly fond of the existing Avatar MODs. If I were to choose, I'd like something far more simple. No galleries, no uploading, nothing like that. Just a simple field on the profile where they can paste the URL, much like the Profile Image.

3. Allow smilies in profile bios?
Is there some way I can make it so my users will be able to use the smiley codes in their profiles, and make the smilies display properly? I mean, forum code works, why not smilies?
- never mind that one, I was being a twerp.


Might also add that I'm fairly new to ASP, and English isn't my first language, so apologies if I've expressed myself foggily.

I hope this is the right part of the forum to ask for things like this.<
15   L A T E S T    R E P L I E S    (Newest First)
JamesPossible Posted - 31 January 2009 : 17:54:45
Hi radiodelicate and others, I am new to Snitz, just wanted a simple ASP forum that I could easily manage and from appearances looks like modify easily as well.

Anyways, I just wanted a simple way to display photos to posts and this is what I did...keeping that in mind all data arrays where modified by appending to rather than changing the structure in the middle.

After scanning the code and identifying topic.asp as the file to modify I ended up making the following mods...simple was all I had on my mind.



Step 1:

130	Member_Country = rsTopic("M_COUNTRY")

Insert:        Member_PhotoURL = rsTopic("M_PHOTO_URL")

131	Topic_Date = rsTopic("T_DATE")

----------------------------------------

Step 2:


290	strSql = strSql & ", R.R_LAST_EDITBY, R.R_SIG, R.R_STATUS, R.R_DATE"

Modified:	strSql = strSql & ", R.R_LAST_EDITBY, R.R_SIG, R.R_STATUS, R.R_DATE, M.M_PHOTO_URL"

----------------------------------------

Step 3:

510             rR_DATE = 21
511             if CanShowSignature = 1 then
512                rM_SIG = 22
513             end if


510             rR_DATE = 21

Insert:            rM_PHOTO_URL = 22

511             if CanShowSignature = 1 then
Modified 513:      rM_SIG = 23
512             end if

----------------------------------------

Step 4:

538             Reply_Date = arrReplyData(rR_DATE, iForum)
539             if CanShowSignature = 1 then
540                Reply_MemberSig = trim(arrReplyData(rM_SIG, iForum))
541             end if


538             Reply_Date = arrReplyData(rR_DATE, iForum)

Insert:            Reply_PhotoURL = arrReplyData(rM_PHOTO_URL, iForum)

539             if CanShowSignature = 1 then
540                Reply_MemberSig = trim(arrReplyData(rM_SIG, iForum))
541             end if

----------------------------------------

Step 5:

560             Response.Write	"                </p>" & vbNewLine & _
561                             "                <p>" & vbNewLine
562             if strCountry = "1" and trim(Reply_MemberCountry) <> "" then


560             Response.Write	"                </p>" & vbNewLine & _

Insert:            Response.write GetMemberPhoto(Reply_PhotoURL)

561                             "                <p>" & vbNewLine
562             if strCountry = "1" and trim(Reply_MemberCountry) <> "" then

----------------------------------------

Step 6:

767             Response.Write	"                </p>" & vbNewLine & _
768                             "                <p>" & vbNewLine
769             if strCountry = "1" and trim(Member_Country) <> "" then

767             Response.Write	"                </p>" & vbNewLine & _

Insert:            Response.write GetMemberPhoto(Member_PhotoURL)

768                             "                <p>" & vbNewLine
769             if strCountry = "1" and trim(Member_Country) <> "" then

----------------------------------------

Step 7:

Last step, I added this function to the end of the file.

If the photo url does not have a .gif, .jpg, or .png extention 
nothing is displayed.  It's a simple function you can change it
easily.

   '***************************************************************************
   '*** 20090131 Modified by James Possible added GetMemberPhoto() function ***
   '*** Displays the member's profile picture with posts only if the        ***
   '*** Photo URL contains any one of the following image extensions        ***
   '*** .gif or .jpg or .png                                                ***
   '***************************************************************************
   Function GetMemberPhoto(ImageURL)

      Const VALID_PICTURE_EXTENSIONS = " .gif .jpg .png "

      Dim sReturn

      sReturn = ""

      If Len(ImageURL) > 4 Then
         If Instr(1, VALID_PICTURE_EXTENSIONS, Right(ImageURL, 4), 1) > 0 Then
            sReturn = "<p>" & vbNewLine & _
                      "<img src=" & """" & ImageURL & """" & vbNewLine & _
                      "     width=" & """" & "150" & """" & vbNewLine & _
                      "    height=" & """" & "150" & """" & vbNewLine & _
                      "    border=" & """" & "0" & """" & "/>" & vbNewLine & _
                      "</p>" & vbNewLine
         End If
      End If

      GetMemberPhoto = sReturn

   End Function


Again, it's clean, it's simple and anyone change modify with ease.

If the user has an image that's to big they can goto...

http://www.resizeyourimage.com/

...save file and upload to any number of sites, (i.e., flickr.com, photobucket.com etc.)

I decided to worry about uploading later, infact I'm considering the integration with http://www.gravatar.com/ in the future.

Appreciate Snitz and hope this helps someone.

James

<
Carefree Posted - 08 July 2008 : 12:00:52
quote:
Originally posted by radiodelicate

it's all pages.
I will check if things get better when I remove the changes as soon as I get home from work, don't have access to my files from here.
I really hope it's the image tweak that slows things down, because other wise I'm clueless, and more or less up shit-creek without a paddle...

uhm, never mind. I checked the rest of the site, outside of the forum, and it's well slow as well. I suppose it's the server that has decided to run a bit extra slow for some reason :/

edit: the speed is back to normal again, so it certainly didn't have anything to do with the mod.



Check your computer indexing & defragmentation. Sometimes a defrag taking place while your forum is in use can make things horrendously slow. Microsoft's default indexing on XP is bad enough, but adding the IIS indexing to it can also make things drag. The forum's search ability works well enough without having every character indexed constantly.

If you find that two indexing programs are autostarting, try disabling one or both. Nero Burning ROM also installs an indexer - so you could have three. None are needed.<
radiodelicate Posted - 08 July 2008 : 11:42:35
quote:
Originally posted by texanman

I think Shaggy had a tweak that allows image in the topic (not replies). I adopted it and it is great. Let me see if I can find it.


I'm not sure if I understand exactly what you mean. If you are referring to my first question, I've already got it fixed. Thanks anyway <
texanman Posted - 08 July 2008 : 11:33:00
I think Shaggy had a tweak that allows image in the topic (not replies). I adopted it and it is great. Let me see if I can find it.<
phy1729 Posted - 08 July 2008 : 10:59:24
Some people who could help with the mod may not be reading this thread anymore and it will make searching eaiser.<
radiodelicate Posted - 08 July 2008 : 10:09:50
After some discussion with the members of my forum, it seems like they would like to have separate Profile Images and Avatars, so the profile image for avatar MOD might not be the best solution after all.

Still, I would like something very much like it. Just letting the members link to an off-site hosted image, and then having it show up as an avatar.
This would require changes to the DB though, wouldn't it? Still, your suggestion is that I post a new topic with the request?<
radiodelicate Posted - 08 July 2008 : 07:49:15
it's all pages.
I will check if things get better when I remove the changes as soon as I get home from work, don't have access to my files from here.
I really hope it's the image tweak that slows things down, because other wise I'm clueless, and more or less up shit-creek without a paddle...

uhm, never mind. I checked the rest of the site, outside of the forum, and it's well slow as well. I suppose it's the server that has decided to run a bit extra slow for some reason :/

edit: the speed is back to normal again, so it certainly didn't have anything to do with the mod.<
AnonJr Posted - 08 July 2008 : 07:36:08
Is it all pages? Just the forums that allow images? Just the forums that dont?

Also, have you tried removing the changes and checking to see if that sped things back up?<
radiodelicate Posted - 08 July 2008 : 07:27:24
my forum has been loading ridiculously slow since installed that image tweak (at least I'm guessing it's because of that. It was fine earlier, and that's the only thing I've modified in a couple of days)
Any clue why, and how to fix it?<
phy1729 Posted - 07 July 2008 : 16:29:18
Glad I could help.<
radiodelicate Posted - 07 July 2008 : 16:06:57
another question regarding images: is it possible to modify the code so I can restrict the number of images allowed in each post? I've been trying to search for it, but haven't had any luck so far.<
radiodelicate Posted - 07 July 2008 : 14:21:50
phy1729, it works a charm, thanks!<
AnonJr Posted - 07 July 2008 : 13:43:04
The way he's got it coded, yes you will have to allow images - but images will only work in the forum(s) that you specify.<
radiodelicate Posted - 07 July 2008 : 13:29:32
quote:
Originally posted by phy1729

The quick and dirty way to do 1 isn't too hard if you're ok with modding the files. In inc_func_common.asp around line 128 (in green)

	if strAllowForumCode = "1" then
		fString = ReplaceURLs(fString)
		fString = ReplaceCodeTags(fString)
		if strIMGInPosts = "1" then
			fString = ReplaceImageTags(fString)
		end if
	end if

Change that to be
if strIMGInPosts = "1" and Forum_ID = <number_of_forum> then

Change <number_of_forum> to whatever forum you need. This has not been tested. If you need to allow for many forums just change it to
if strIMGInPosts = "1" and (Forum_ID = <number_of_forum> or Forum_ID = <number_of_forum2> or Forum_ID = <number_of_forum3> ...) then



cheers, I'll give it a go. I'll have to allow images first, yeah?<
phy1729 Posted - 07 July 2008 : 13:12:52
The quick and dirty way to do 1 isn't too hard if you're ok with modding the files. In inc_func_common.asp around line 128 (in green)

	if strAllowForumCode = "1" then
		fString = ReplaceURLs(fString)
		fString = ReplaceCodeTags(fString)
		if strIMGInPosts = "1" then
			fString = ReplaceImageTags(fString)
		end if
	end if

Change that to be
if strIMGInPosts = "1" and Forum_ID = <number_of_forum> then

Change <number_of_forum> to whatever forum you need. This has not been tested. If you need to allow for many forums just change it to
if strIMGInPosts = "1" and (Forum_ID = <number_of_forum> or Forum_ID = <number_of_forum2> or Forum_ID = <number_of_forum3> ...) then
<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07