Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Topic Image Preview
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 13 June 2009 :  09:46:51  Show Profile  Reply with Quote
The Topic Image Preview MOD scans topics from allowed forums, then displays images and associated topic titles from the last 10 topics which included images. Each image thumbnail is linked to a full size version and each topic title is linked to the topic itself.

This mod includes a check of whether members are allowed access to a forum before displaying the images.

Guests are not allowed access. To allow access to guests, in "Topic_Images.asp", delete (or comment out) lines 50-52; or in "inc_topic_images.asp", delete (or comment out) lines 41-43.

"inc_topic_images.asp" is provided to enable the image display to appear in "active.asp" (if you want them displayed with the active topics page).

Get a copy at SnitzBitz.



Edit: Thanks to a suggestion by Etymon, in v1.1, I added a check to determine whether images are allowed at all, and another to check if there is an image path.

Edited by - Carefree on 15 June 2009 18:49:53

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 13 June 2009 :  21:23:28  Show Profile  Reply with Quote
Not sure if it is me or what, but the topics do not match the images on my test site.

Cheers,

David Greening
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 13 June 2009 :  22:46:45  Show Profile  Visit Etymon's Homepage  Reply with Quote
I sent Carefree an e-mail asking him to make the MOD check for unmoderated posts. Before, it allowed them into the mix. He updated the MOD at Snitz Bitz. Maybe try downloading it again and see if that fixes the problem.

Edited by - Etymon on 13 June 2009 22:50:07
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 14 June 2009 :  00:19:04  Show Profile  Reply with Quote
quote:
Originally posted by Classicmotorcycling

Not sure if it is me or what, but the topics do not match the images on my test site.



Got a test login so I can see?
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 14 June 2009 :  04:10:56  Show Profile  Reply with Quote
Not for the test site, sorry.

What I am getting is that there is an image in a topic, but when you click on the topic, there is no image in the actual topic. The image relates to a different topic when I do a search for for the image name in the search function I find they topic which is totally different.

Great concept but.

Cheers,

David Greening
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 14 June 2009 :  11:41:57  Show Profile  Visit modifichicci's Homepage  Reply with Quote
It works, but if a forum has a lot of topics i have a script timed error..

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 15 June 2009 :  18:55:51  Show Profile  Reply with Quote
quote:
What I am getting is that there is an image in a topic, but when you click on the topic, there is no image in the actual topic. The image relates to a different topic when I do a search for for the image name in the search function I find they topic which is totally different.

This is really odd behavior. Is anyone else experiencing this?


quote:
... if a forum has a lot of topics i have a script timed error.

Does anyone see a method to speed up this script? Don't be bashful....
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 15 June 2009 :  20:54:27  Show Profile  Visit Etymon's Homepage  Reply with Quote
I made it work so it has one image per row. I like that better myself.
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 15 June 2009 :  21:08:41  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I'm curious as to how this mod is intended to be used? It's an interesting mod but I'm not quite sure what it does.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 15 June 2009 21:08:51
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 15 June 2009 :  22:02:52  Show Profile  Reply with Quote
Since men (more so than women) are visually stimulated creatures, I thought that perhaps images would catch their eye and generate more interest in topics that might otherwise have been passed over. This mod simply checks if photos are allowed, then displays images and links to topics from last 10 topics which include images and where access to forums was granted. It's just a form of topic advertising.

Edited by - Carefree on 15 June 2009 22:03:34
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 15 June 2009 :  22:33:00  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Thanks for the explaination! Great idea!

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 16 June 2009 :  05:52:46  Show Profile  Reply with Quote
Sounds a cool idea.. is there a working demo available?
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 17 June 2009 :  13:36:21  Show Profile  Reply with Quote
Andy, here's the main file - drop it on your forum (call it whatever you like) and run it.



<%
'###############################################################################
'##
'##         Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'##         Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output.  The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; if not, write to:
'##
'##         Free Software Foundation, Inc.
'##         59 Temple Place, Suite 330
'##         Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'##         http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'##         manderson@snitz.com
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp"-->
<%
if mLev<1 or (STRIMGINPOSTS<>"1" or STRIMAGEURL="") then
	Response.Redirect	"default.asp"
end if
Response.Write	"<table border=""0"" width=""100%"">" & vbNewLine & _
	"	<tr>" & vbNewLine & _
	"		<td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
	"		" & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
	"		" & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Topics Image Preview<br /></font></td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"</table><br>" & vbNewLine & _
	"<table align=""center"" bgcolor=""" & strTableBorderColor & """ border=""1"" width=""100%"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
	"	<tr valign=""middle""><br>" & vbNewLine & _
	"		<td colspan=""2"" width=""100%"" align=""center"" bgcolor=""" & strCategoryCellColor & """>" & vbNewLine & _
	"			<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strCategoryFontColor & """><b>Last 10 Topics Image Preview</b>" & vbNewLine & _
	"			</font>" & vbNewLine & _
	"		</td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"	<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><b>" & vbNewLine
Call ChkAccess

strSql="SELECT FORUM_ID, T_STATUS, T_DATE, T_MESSAGE, T_SUBJECT, Topic_ID FROM " & strTablePrefix & "TOPICS WHERE"
if strPrivateForums = "1" and allAllowedForums <> "" and mLev < 4 then
	strSql=strSql & " (FORUM_ID IN (" & allAllowedForums & ")) AND"
end if
strSql=strSql & " T_STATUS=1 AND T_MESSAGE LIKE '%%' ORDER BY T_DATE DESC"
set rsDisplay=my_Conn.Execute(strSql)
if rsDisplay.EOF or (mLev < 4 AND allAllowedForums="")then
	Response.Redirect	"default.asp"
end if
if not rsDisplay.EOF then
	rsDisplay.MoveFirst
	ii=0
	do until rsDisplay.EOF
		strMsg=rsDisplay("T_MESSAGE")
		if lcase(instr(strMsg,"")) then
			ii=ii+1
			if ii=11 then
				exit do
			end if
			for i=1 to len(strMsg)
				if lcase(mid(strMsg,i,5))="" then
					intk=i
					strImgURL=mid(strMsg,intj,intk-intj)
				end if
			next
			address = lcase(strForumURL&Trim(strImgURL))
		end if
		strTgtURL(ii)=address
		strSubj(ii)=rsDisplay("T_Subject")
		strTPID(ii)=rsDisplay("Topic_ID")
		il=0
		rsDisplay.MoveNext
	Loop
	for ij=1 to 5
		Response.Write	"	<tr height=""275"" valign=""bottom"">" & vbNewLine
		for ik=1 to 2
			il=il+1
			Response.Write	"		<td width=""50%"" align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine
			if strTgtURL(il)>"" then
				Response.Write	"<a href=""" & strTgtURL(il) & """ target=""_blank"">" & vbNewLine & _
					"<img src=""" & strTgtURL(il) & """ width=""298""></a><br>" & vbNewLine
			end if
			Response.Write	"<a href=""topic.asp?topic_id="& cInt(strTPID(il)) & """ target=""_blank"">" & strSubj(il) & "</a>" & vbNewLine & _
				"</td>" & vbNewLine
		next
		Response.Write	"	</tr>" & vbNewLine
	next
	rsDisplay.Close
end if
Set rsDisplay=Nothing
Response.Write	"	</table>" & vbNewLine
WriteFooter
Response.End


Sub ChkAccess
	if mlev = 3 then
		strSql = "SELECT FORUM_ID FROM " & strTablePrefix & "MODERATOR " & _
		 " WHERE MEMBER_ID = " & MemberID
		Set rsMod = Server.CreateObject("ADODB.Recordset")
		rsMod.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
		if rsMod.EOF then
			recModCount = ""
		else
			allModData = rsMod.GetRows(adGetRowsRest)
			recModCount = UBound(allModData,2)
		end if
		RsMod.close
		set RsMod = nothing
		if recModCount <> "" then
			for x = 0 to recModCount
				if x = 0 then
					ModOfForums = allModData(0,x)
				else
					ModOfForums = ModOfForums & "," & allModData(0,x)
				end if
			next
		else
			ModOfForums = ""
		end if
	else
		ModOfForums = ""
	end if
	if strPrivateForums = "1" and mLev < 4 then
		allAllowedForums = ""
		allowSql = "SELECT FORUM_ID, F_SUBJECT, F_PRIVATEFORUMS, F_PASSWORD_NEW"
		allowSql = allowSql & " FROM " & strTablePrefix & "FORUM"
		allowSql = allowSql & " WHERE F_TYPE = 0"
		allowSql = allowSql & " ORDER BY FORUM_ID"
		set rsAllowed = Server.CreateObject("ADODB.Recordset")
		rsAllowed.open allowSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
		if rsAllowed.EOF then
			recAllowedCount = ""
		else
			allAllowedData = rsAllowed.GetRows(adGetRowsRest)
			recAllowedCount = UBound(allAllowedData,2)
		end if
		rsAllowed.close
		set rsAllowed = nothing
		if recAllowedCount <> "" then
			fFORUM_ID = 0
			fF_SUBJECT = 1
			fF_PRIVATEFORUMS = 2
			fF_PASSWORD_NEW = 3
			for RowCount = 0 to recAllowedCount
				Forum_ID = allAllowedData(fFORUM_ID,RowCount)
				Forum_Subject = allAllowedData(fF_SUBJECT,RowCount)
				Forum_PrivateForums = allAllowedData(fF_PRIVATEFORUMS,RowCount)
				Forum_FPasswordNew = allAllowedData(fF_PASSWORD_NEW,RowCount)
				if mLev = 4 then
					ModerateAllowed = "Y"
				elseif mLev = 3 and ModOfForums <> "" then
					if (strAuthType = "nt") then
						if (chkForumModerator(Forum_ID, Session(strCookieURL & "username")) = "1") then ModerateAllowed = "Y" else ModerateAllowed = "N"
					else
						if (instr("," & ModOfForums & "," ,"," & Forum_ID & ",") > 0) then ModerateAllowed = "Y" else ModerateAllowed = "N"
					end if
				else
					ModerateAllowed = "N"
				end if
				if chkForumAccessNew(Forum_PrivateForums,Forum_FPasswordNew,Forum_Subject,Forum_ID,MemberID) = true then
					if allAllowedForums = "" then
						allAllowedForums = Forum_ID
					else
						allAllowedForums = allAllowedForums & "," & Forum_ID
					end if
				end if
			next
		end if
		if allAllowedForums = "" then allAllowedForums = 0
	end if
End Sub
%>

Edited by - Carefree on 22 June 2009 00:49:55
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 17 June 2009 :  16:12:19  Show Profile  Reply with Quote
Carefree, did you get my e-mail? I sent you a link to a demo so you could see what it was doing.

Cheers,

David Greening
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 18 June 2009 :  14:33:12  Show Profile  Reply with Quote
Haven't checked my mail in a couple of days - will look now.
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 18 June 2009 :  14:56:20  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I was trying this out and noticed that if an image is posted in a private forum and a member is not allowed in that forum and the visit the topic_images.asp page, they will see this:


Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07