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)
 Something Like Carefree's "Media" Mod

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
MaGraham Posted - 05 November 2013 : 14:30:38
I am using Carefree's "Media" mod and wanted to ask about something that could be modeled by his mod.

My site has a lot of Christian artist fans so naturally they love listening to the artists' music. For that reason, this is what I would like that would obviously be similar to Carefree's "Media" mod. . .

Instead of there being a list of the different "types" of media (Comedy, Suspense, etc.), I would like for it to have a means of searching for a specific artist (sort of like on members.asp). Example: The member could possibly type "John Smith" and locate only John's music, or, type "John" to display results for artists with "John" in his name, or do the same by typing "Smith" in that area in case the member isn't sure about the spelling of both the first and last name of the artist and simply types either the first or last but not both.

In the Admin Options area I would like a column to be able to add a link to the artist's website and additional columns for iTunes, Amazon and Gaither Music links in case the members would prefer finding the artist's music there to purchase. I would like for the links to then display in the pop-up window where the video would play. The links could display something similar to this below.

1. Click here to purchase this CD on iTunes or Amazon.
2. Click here to purchase this DVD on iTunes or Amazon.
3. Click here to purchase this music on the artist's website.
4. Click here to purchase this music on the Gaither Music website.

If it's too much trouble for those links to display in the pop-up window, perhaps the links could display under the "title" graphic of the music after the search is complete.

Also, could this mod play Vimeo videos as well since some of the artists use that site only? If not, when the window opens to play the video could it display a link to Vimeo that would say something like, "Click here to watch this video on Vimeo" instead of actually playing the video? And, could that link open in a new window so when members close it out they would still be on my site?

Would this require a lot of coding? [praying]

15   L A T E S T    R E P L I E S    (Newest First)
Maxime Posted - 23 November 2013 : 10:19:24
Thank you very much Carefree excellent work. Danny C and I am on my chatquiz forum

I will translate the page into French artists.asp
Carefree Posted - 22 November 2013 : 17:20:38
I'll take a look later, Maxime. No time right now. Paging fixed. Added default search category and changed sorting to retain previously specified criterion.
Maxime Posted - 22 November 2013 : 12:32:43
hello,

there is a problem on the artists.asp page. I can not go to the second page. it displays 1 above and if I click 2, it shows 2 but not down and it does not go on page 2

Look http://www.chatquiz.org/artists.asp
Maxime Posted - 22 November 2013 : 10:16:46
Carefree Thank you, I'll try that and put the page in the administration to have it available when I want to configure mp3
Carefree Posted - 22 November 2013 : 10:11:47
Run the dbs file from the admin console, mod setup. Then save the other file, titled "artists.asp" .... Do not rename it unless you change lines 111, 349, 554 & 580 to match the new name. To add mp3s, simply run "artists.asp" as the forum admin and you'll get the option.
Maxime Posted - 22 November 2013 : 09:49:23
To install this mod that what must be the first page, I realized that installs the fields in the database. Artiste.asp but that should be done and put mp3?
Carefree Posted - 22 November 2013 : 04:29:10
It is complete already, Maxime. Get the files above.
Maxime Posted - 22 November 2013 : 02:08:25
If I understand because the Google translation is not an exact science. What you used to have to post a list of mp3 with the artist, to listen and be directed to a purchase site?

Could you develop the mod What can add and modier list mp3s and artist and everything was. That this is done on the administration part of the forum and name the members, they would just be able to search and read and leadership for purchase.

I am very interested in this mod it is complete.
Carefree Posted - 15 November 2013 : 08:34:53
You're welcome. Enjoy.
MaGraham Posted - 14 November 2013 : 22:32:19

That corrected it, Carefree.

Thank you so much!

I just haven't had time to work on this beyond making this correction though.

Carefree Posted - 11 November 2013 : 00:28:15
Fixed above. Sorry, forgot to test after last change.
MaGraham Posted - 11 November 2013 : 00:14:15

Carefree, this installed error free! YEA! :)

I haven't had time to do anything with it really just yet but did get started with one artist.

I then left something out and when I went to edit it and tried to submit the additional info, I received this error message below.



Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[MySQL][ODBC 5.1 Driver][mysqld-5.5.28]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

/fp/artists.asp, line 88



I've had a couple of really big things come up that I simply must take care of so it's going to be a few before I can work on this again.

I can hardly wait to get back to it though!

MaGraham Posted - 10 November 2013 : 04:26:10

Oh wow! Thank you so much, Carefree!!

I'm looking at this now. I'll let you know how it goes once I get to playing around with it.

Carefree Posted - 10 November 2013 : 02:49:37
Here you go:

"dbs_artists.asp"

Artists 3.4.07

[DROP]
MUSIC
[END]

[CREATE]
MUSIC
A_ID
A_AMAZON#VARCHAR(255)#NULL#
A_ARTISTF#VARCHAR(50)#NULL#
A_ARTISTL#VARCHAR(50)#NULL#
A_IMAGE#VARCHAR(255)#NULL#
A_ITUNES#VARCHAR(255)#NULL#
A_TITLE#VARCHAR(255)#NULL#
A_URL#VARCHAR(255)#NULL#
A_VIMEO#VARCHAR(255)#NULL#
A_WEBSITE#VARCHAR(255)#NULL#
A_YOUTUBE#VARCHAR(255)#NULL#
[END]


"artists.asp"

<%
'###############################################################################
'##
'##	              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_header.asp" -->
<%
Err.Clear
On Error Resume Next
Dim fnum, intPgSize, myPage:intPgSize=10
Response.Write	"      <table border=""0"" width=""100%"">" & vbNewLine & _
	"        <tr valign=""middle"">" & 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(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""Artists.asp"">Artists</a><br /></font></td>" & vbNewLine & _
	"		</tr>" & vbNewLine & _
	"	</table><br />" & vbNewLine
If strDBNTUserName = "" Then
	Response.Write	"      <table width=""100%"" border=""0"">" & vbNewLine & _
			"        <tr>" & vbNewLine & _
			"          <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
			"          " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
			"          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Media</font></td>" & vbNewLine & _
			"        </tr>" & vbNewLine & _
			"      </table>" & vbNewLine & _
			"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There is a problem!<br /><br />You must be logged in to view this page.<br /><br /><a href=""JavaScript:history.go(-1)"">Back to Forum</a></font></p>" & vbNewLine & _
			"      <br />" & vbNewLine
	WriteFooter
	Response.End
End If
If Request("mode")="delete" Then
	my_Conn.Execute("DELETE FROM " & strTablePrefix & "MUSIC WHERE A_ID=" & Request("id"))
	Response.Redirect	"artists.asp"
End If
If Request("mode")="add" or (Request("mode")="edit" and Request("method_type")="doit") Then
	strAmazon=trim(chkString(Request("A_Amazon"),"URL"))
	strArtistF=trim(chkString(Request("A_ArtistF"),"SQLString"))
	strArtistL=trim(chkString(Request("A_ArtistL"),"SQLString"))
	strImage=trim(chkString(Request("A_Image"),"SQLString"))
	strTitle=trim(chkString(Request("A_Title"),"SQLString"))
	strItunes=trim(chkString(Request("A_Itunes"),"URL"))
	strURL=trim(chkString(Request("A_URL"),"URL"))
	strVimeo=trim(chkString(Request("A_Vimeo"),"URL"))
	strWebsite=trim(chkString(Request("A_Website"),"URL"))
	strYouTube=trim(chkString(Request("A_YouTube"),"URL"))
End If
If Request("method_type")="doit" Then
	If Request("mode")="add" Then
		strSql="INSERT INTO " & strTablePrefix & "MUSIC (A_AMAZON, A_ARTISTF, A_ARTISTL, A_IMAGE, A_TITLE, A_ITUNES, A_URL, A_VIMEO, A_WEBSITE, A_YOUTUBE) VALUES ('" & strAmazon & "', '" & strArtistF & "', '" & strArtistL & "', '" & strImage & "', '" & strTitle & "', '" & strItunes & "', '" & strURL & "', '" & strVimeo & "', '" & strWebsite & "', '" & strYouTube & "')"
	Else
		strSql="UPDATE " & strTablePrefix & "MUSIC SET A_AMAZON='" & strAmazon & "', A_ArtistF='" & strArtistF & "', A_ArtistL='" & strArtistL & "', A_IMAGE='" & strImage & "', A_TITLE='" & strTitle & "', A_ITUNES='" & strItunes & "', A_URL='" & strURL & "', A_VIMEO='" & strVimeo & "', A_WEBSITE='" & strWebsite & "', a_YouTube='" & strYouTube & "' WHERE A_ID=" & Request("id")
	End If
	my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
	Response.Redirect	"artists.asp"
End If
If Request("mode")="edit" Then
	strSql="SELECT * FROM " & strTablePrefix & "MUSIC WHERE A_ID=" & Request("id")
	Set rsArtists=my_Conn.Execute(strSql)
	If not rsArtists.EOF Then
		intID=rsArtists("A_ID")
		strAmazon=rsArtists("A_Amazon")
		strArtistF=rsArtists("A_ArtistF")
		strArtistL=rsArtists("A_ArtistL")
		strImage=rsArtists("A_Image")
		strItunes=rsArtists("A_Itunes")
		strTitle=rsArtists("A_Title")
		strURL=rsArtists("A_URL")
		strVimeo=rsArtists("A_Vimeo")
		strWebsite=rsArtists("A_Website")
		strYouTube=rsArtists("A_YouTube")
		rsArtists.Close
	End If
	Set rsArtists=Nothing
End If
If Request("mode")="add" or Request("mode")="edit" Then
	Response.Write	"<form action=""artists.asp"" method=""post"">" & vbNewLine & _
		"	<input type=""hidden"" name=""mode"" value=""" & Request("mode") & """ />" & vbNewLine & _
		"	<input type=""hidden"" name=""method_type"" value=""doit"" />" & vbNewLine & _
		"	<input type=""hidden"" name=""id"" value=""" & Request("id") & """ />" & vbNewLine & _
		"	<table border=""0"" bgColor=""" & strPageBGColor & """ width=""600px;"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
		"		<tr>" & vbNewLine & _
		"			<td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
		"				<table border=""1"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Artist, First Name: </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""75"" style=""width:98%; border:1;  color:maroon;"" name=""A_ArtistF"" value=""" & strArtistF & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Artist, Last Name: </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""75"" style=""width:98%; border:1;  color:maroon;"" name=""A_ArtistL"" value=""" & strArtistL & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Image: </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""255"" style=""width:98%; border:1;  color:maroon;"" name=""A_Image"" value=""" & strImage & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Title: </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""255"" style=""width:98%; border:1;  color:maroon;"" name=""A_Title"" value=""" & strTitle & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Amazon: </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""255"" style=""width:98%; border:1;  color:maroon;"" name=""A_Amazon"" value=""" & strAmazon & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>ITunes: </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""255"" style=""width:98%; border:1;  color:maroon;"" name=""A_Itunes"" value=""" & strItunes & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>URL (DL): </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""255"" style=""width:98%; border:1;  color:maroon;"" name=""A_URL"" value=""" & strURL & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Vimeo: </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""255"" style=""width:98%; border:1;  color:maroon;"" name=""A_Vimeo"" value=""" & strVimeo & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Website: </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""255"" style=""width:98%; border:1;  color:maroon;"" name=""A_Website"" value=""" & strWebsite & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>YouTube: </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
		"							<input type=""text"" maxlength=""255"" style=""width:98%; border:1;  color:maroon;"" name=""A_YouTube"" value=""" & strYouTube & """ />" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"				</table>" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"		</tr>" & vbNewLine & _
		"		<tr valign=""top"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
		"			<td align=""center"" colspan=""2"" width=""100%"">" & vbNewLine & _
		"				<input type=""submit"" name=""Submit"""
	If Request("mode")="add" Then Response.Write	" value=""Add"" />"	Else Response.Write	" value=""Edit"" />"
	Response.Write	"			</td>" & vbNewLine & _
		"		</tr>" & vbNewLine & _
		"	</table>" & vbNewLine & _
		"</form>" & vbNewLine
	WriteFooter
	Response.End
End If
nRefreshTime = Request.Cookies(strTempCookieType & "Reload")
Response.Write	"    <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
	"    function ChangePage(fnum){" & vbNewLine & _
	"    	if (fnum == 1) {" & vbNewLine & _
	"    		document.PageNum1.submit();" & vbNewLine & _
	"    	}" & vbNewLine & _
	"    	else {" & vbNewLine & _
	"    		document.PageNum2.submit();" & vbNewLine & _
	"    	}" & vbNewLine & _
	"    }" & vbNewLine & _
	"    </script>" & vbNewLine
If Request("whichpage")>"" Then
	If not isNumeric(Request("whichpage")) Then
		myPage=1
	Else
		myPage=cInt(trim(Request("whichpage")))
	End If
Else
	mypage=1
End If
If Request("sort")>"" Then
	If Right(Request("sort"),4)="Desc" Then strOrder=" Desc" Else strOrder=" Asc"
	If Left(Request("sort"),1)="A" Then
		strSort=" ORDER BY A_ARTISTL " & strOrder & ", A_ARTISTF " & strOrder
	Else
		strSort=" ORDER BY A_TITLE" & strOrder
	End If
Else
	strSort=""
End If
If Request("strKeys")>"" Then
	keyword=Request("strKeys")
ElseIf Request("keyword")>"" Then
	keyword=Request("keyword")
Else
	keyword=""
End If
If keyword>"" Then
	If Request("category")="" Then
		strCategory="A_Title"
	Else
		strCategory=Request("category")
	End If
	keyword = Request("keyword")
	strWhere=""
	If instr(keyword," ") Then
		keywords = split(keyword)
		keycnt = ubound(keywords)
		For i = 0 to keycnt
			If i = 0 Then
				strKeywords = keywords(i)
			Else
				strKeywords = strKeywords & "," & keywords(i)
			End If
		Next
		j=0:strWords=""
		For each word in keywords
			If j=1 Then strWords=strWords & Word
			If word="NOT" Then j=1
		Next
		For each word in keywords
			If instr(keyword," AND ") Then
				If word <> "AND" and word>"" Then
					If word="NOT" Then
						If strCategory="A_Artist" Then
							strWhere = left(strWhere, len(strWhere)-3) & " AND (A_ArtistF NOT LIKE '%" & strWords & "%' AND A_ArtistL NOT LIKE '%" & strWords & "%')"
							Exit For
						Else
							strWhere = left(strWhere, len(strWhere)-3) & " AND " & strCategory & " NOT LIKE '%" & strWords & "%'"
							Exit For
						End If
					Else
						If strCategory="A_Artist" Then
							strWhere = strWhere & "(A_ArtistF LIKE '%" & word & "%' OR A_ArtistL LIKE '%" & word & "%') AND "
						Else
							strWhere = strWhere & strCategory & " LIKE '%" & word & "%' AND "
						End If
					End If
				End If
			Else
				If word <> "OR" and word>"" Then
					If word="NOT" Then
						If strCategory="A_Artist" Then
							strWhere = left(strWhere, len(strWhere)-3) & " AND (A_ArtistF NOT LIKE '%" & strWords & "%' AND A_ArtistL NOT LIKE '%" & strWords & "%')"
							Exit For
						Else
							strWhere = left(strWhere, len(strWhere)-3) & " AND " & strCategory & " NOT LIKE '%" & strWords & "%'"
							Exit For
						End If
					Else
						If strCategory="A_Artist" Then
							strWhere = strWhere & "(A_ArtistF LIKE '%" & word & "%' OR A_ArtistL LIKE '%" & word & "%') OR "
						Else
							strWhere = strWhere & strCategory & " LIKE '%" & word & "%' OR "
						End If
					End If
				End If
			End If
		Next
	Else
		If keyword>"" and keyword <> "NOT" Then
			If strCategory="A_Artist" Then
				strWhere = strWhere & "(A_ArtistF LIKE '%" & keyword & "%' OR A_ArtistL LIKE '%" & keyword & "%')"
			Else
				strWhere = strWhere & strCategory & " LIKE '%" & keyword & "%'"
			End If
		End If
	End If
	If right(strWhere,4)="AND " Then strWhere=left(strWhere,len(strWhere)-5)
	If right(strWhere,3)="OR " Then strWhere=left(strWhere,len(strWhere)-4)
	If left(keyword,1)=chr(34) and right(keyword,1)=chr(34) Then
		strkeyword="#34;" & mid(keyword,2,len(keyword)-2) & "#34;"
		If strCategory="A_Artist" Then
			strWhere="A_ARTISTL LIKE '%" & mid(keyword,2,len(keyword)-2) & "%' OR A_ARTISTF LIKE '%" & mid(keyword,2,len(keyword)-2) & "%'"
		Else
			strWhere=strCategory & " LIKE '%" & mid(keyword,2,len(keyword)-2) & "%'"
		End If
	Else
		strkeyword=keyword
	End If
End If
If strWhere>"" Then
	strWhere=" WHERE " & strWhere
End If
If right(strWhere,4)=" AND" Then strWhere=left(strWhere,len(strWhere)-4)
If right(strWhere,3)=" OR" Then strWhere=left(strWhere,len(strWhere)-3)
If Request("mode")="initial" Then strWhere=" WHERE uCase(Left(A_ArtistL,1))='" & Request("A_Artist") & "'"
Response.Write	"<form action=""artists.asp"" method=""post"">" & vbNewLine & _
	"	<table border=""0"" bgColor=""" & strPageBGColor & """ width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
	"		<tr>" & vbNewLine & _
	"			<td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
	"				<table border=""1"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
	"					<tr valign=""top"">" & vbNewLine & _
	"						<td align=""center"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
	"							<font face=""" & strCategoryFontFace & """ size=""" & strHeaderFontSize+1 & """ color=""" & strCategoryFontColor & """><b>Search</b>" & vbNewLine & _
	"							</font>" & vbNewLine & _
	"						</td>" & vbNewLine & _
	"					</tr>" & vbNewLine & _
	"					<tr valign=""top"">" & vbNewLine & _
	"						<td align=""center"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
	"							<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><input type=""radio"" name=""category"" value=""A_Artist""" & chkRadio(strCategory,"A_Artist",true) & " /> Artist   <input type=""radio"" name=""category"" value=""A_Title""" & chkRadio(strCategory,"A_Title",true) & " /> Title<br /><input tabindex=""1"" type=""text"" size=""120"" id=""keyword"" name=""keyword"" value=""" & strkeyword & """>" & vbNewLine & _
	"							</font>" & vbNewLine & _
	"						</td>" & vbNewLine & _
	"					</tr>" & vbNewLine & _
	"				</table>" & vbNewLine & _
	"			</td>" & vbNewLine & _
	"		</tr>" & vbNewLine & _
	"		<tr valign=""top"">" & vbNewLine &_
	"			<td align=""center"" width=""100%"">" & vbNewLine & _
	"				<input type=""submit"" value=""Search"" />" & vbNewLine & _
	"			</td>" & vbNewLine & _
	"		</tr>" & vbNewLine & _
	"	</table>" & vbNewLine & _
	"</form><p align=""center""><a href=""artists.asp""><acronym style=""text-decoration:underline; border:none;"" title=""Display all artists"">All</acronym></a> " & vbNewLine
For intChar = 65 to 90
	Response.Write	"<a href=""artists.asp?mode=initial&A_Artist=" & chr(intChar) & """><acronym style=""text-decoration:underline; border:none;"" title=""Display artists starting with '" & chr(intChar) & "'"">" & chr(intChar) & "</acronym></a> "
Next
Response.Write	"<div style=""display: none; position: absolute; z-index: 110; left: 400; top: 150px; width: 15; height: 90%;"" id=""preview_div""></div>"
Response.Write	"</p><form action=""artists.asp"" method=""post""><input type=""hidden"" name=""hid-page"" id=""hid-page"" value=""" & mypage & """ /><table border=""0"" bgColor=""" & strPageBGColor & """ width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
	"	<tr>" & vbNewLine
strSql = "SELECT COUNT(A_ID) AS CNT FROM " & strTablePrefix & "MUSIC " & strWhere
Set rsArtists=my_Conn.Execute(strSql)
If not rsArtists.EOF Then
	intCount=rsArtists("CNT")
	maxpages=cInt(intCount/intPgSize)
	If intCount/intPgSize>maxpages Then
		maxpages=maxpages+1
	End If
	rsArtists.Close
End If
Response.Write	"		<td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
	"			<table border=""1"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
	"				<tr valign=""top"">" & vbNewLine & _
	"					<td align=""center"" colspan=""5"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
	"						<font face=""" & strCategoryFontFace & """ size=""" & strHeaderFontSize+1 & """ color=""" & strCategoryFontColor & """><b>Results</b>" & vbNewLine & _
	"						</font>" & vbNewLine & _
	"					</td>" & vbNewLine & _
	"				</tr>" & vbNewLine & _
	"				<tr bgColor=""" & strHeadCellColor & """ valign=""middle"">" & vbNewLine & _
	"					<td align=""center"" width=""15%"">" & vbNewLine & _
	"						<font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Image</b>" & vbNewLine & _
	"						</font>" & vbNewLine & _
	"					</td>" & vbNewLine & _
	"					<td align=""center"" width=""40%"">" & vbNewLine & _
	"						<font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b><a href=""artists.asp?sort="
If Request("sort")="Title Desc" Then Response.Write	"Title Asc" Else Response.Write	"Title Desc"
If Request("mode")>"" Then Response.Write	"&mode=" & Request("mode")
If Request("keyword")>"" Then Response.Write	"&keyword=" & Request("keyword") & "&category=" & Request("category")
If Request("whichpage")>"" Then Response.Write	"&whichpage=" & Request("whichpage")
Response.Write	"""" & dWStatus("Sort by Title") & "><acronym style=""text-decoration:underline; border:none;"" title=""Sort by Title""><b>Title</b></acronym></a>" & vbNewLine & _
	"						</font>" & vbNewLine & _
	"					</td>" & vbNewLine & _
	"					<td align=""center"" width=""30%"">" & vbNewLine & _
	"						<font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b><a href=""artists.asp?sort="
If Request("sort")="Artist Desc" Then Response.Write	"Artist Asc" Else Response.Write	"Artist Desc"
If Request("mode")>"" Then Response.Write	"&mode=" & Request("mode")
If Request("keyword")>"" Then Response.Write	"&keyword=" & Request("keyword") & "&category=" & Request("category")
If Request("whichpage")>"" Then Response.Write	"&whichpage=" & Request("whichpage")
Response.Write	"""" & dWStatus("Sort by Artist") & "><acronym style=""text-decoration:underline; border:none;"" title=""Sort by Artist""><b>Artist</b></acronym></a>" & vbNewLine & _
	"						</font>" & vbNewLine & _
	"					</td>" & vbNewLine & _
	"					<td align=""center"" width=""10%"">" & vbNewLine & _
	"						<font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Links</b>" & vbNewLine & _
	"						</font>" & vbNewLine & _
	"					</td>" & vbNewLine & _
	"					<td align=""center"" width=""5%"">" & vbNewLine
If mLev>3 Then
	Response.Write	"						<font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Tools</b>  <a href=""artists.asp?mode=add""" & dWStatus("Add") & "><acronym style=""border:none; text-decoration:none"" title=""Add""><img src=""" & strImageURL & "icon_folder_new.gif"" height=""16"" width=""16"" alt=""Add"" style=""border:none; text-decoration:none;""></acronym></a>" & vbNewLine & _
	"						</font>" & vbNewLine
Else
	Response.Write	" "
End If
Response.Write	"					</td>" & vbNewLine & _
	"				</tr>" & vbNewLine
strSql = "SELECT COUNT(A_ID) AS CNT FROM " & strTablePrefix & "MUSIC " & strWhere
Set rsArtists=my_Conn.Execute(strSql)
If intCount=0 Then
	Response.Write	"			<tr valign=""middle"">" & vbNewLine & _
		"					<td align=""center"" colspan=""5"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
		"						<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>No media found!" & vbNewLine & _
		"						</font>" & vbNewLine & _
		"					</td>" & vbNewLine & _
		"				</tr>" & vbNewLine & _
		"			</table>" & vbNewLine & _
		"		</td>" & vbNewLine & _
		"	</tr>" & vbNewLine & _
		"</table></form></div>" & vbNewLine
	WriteFooter
	Response.End
End If
Set rsArtists=Nothing
If strSort="" Then strSort = " ORDER BY A_TITLE ASC"
strSql = "SELECT * FROM " & strTablePrefix & "MUSIC" & strWhere & strSort
Set rsArtists=my_Conn.Execute(strSql)
If not rsArtists.EOF Then
	If Request("whichpage") > 1 Then
		intLocation=(cInt(Request("whichpage")-1)*intPgSize)
		rsArtists.Move(intLocation)
		If Err.Number <> 0 Then
 			MsgBox Err.Number & ": " & Err.Description & vbCrLf & " on line " & Err.Line & " of " & Err.Source
		End If
		On Error GoTo 0
	Else
		rsArtists.MoveFirst
	End If
	Rec=1
	intI=0
	Do while not rsArtists.EOF
		strAmazon="":strArtistF="":strArtistL="":strImage="":strItunes="":strTitle="":strURL="":strVimeo="":strWebsite="":strYouTube=""
		If intI=0 Then CColor=strForumFirstCellColor Else CColor=strAltForumCellColor
		intID=rsArtists("A_ID")
		If rsArtists("A_Amazon")>"" Then strAmazon=Replace(rsArtists("A_Amazon")," ","%20")
		strArtistF=rsArtists("A_ArtistF")
		strArtistL=rsArtists("A_ArtistL")
		If rsArtists("A_Image")>"" Then strImage=Replace(rsArtists("A_Image")," ","%20")
		If rsArtists("A_Itunes")>"" Then strItunes=Replace(rsArtists("A_Itunes")," ","%20")
		strTitle=rsArtists("A_Title")
		If rsArtists("A_URL")>"" Then strURL=Replace(rsArtists("A_URL")," ","%20")
		If rsArtists("A_vimeo")>"" Then strVimeo=Replace(rsArtists("A_Vimeo")," ","%20")
		If rsArtists("A_Website")>"" Then strWebsite=Replace(rsArtists("A_Website")," ","%20")
		If rsArtists("A_YouTube")>"" Then strYouTube=Replace(rsArtists("A_YouTube")," ","%20")
		If rsArtists("A_ArtistL")>"" and rsArtists("A_ArtistF")>"" Then
			strArtist = rsArtists("A_ArtistL") &", " & rsArtists("A_ArtistF")
		Else 
			strArtist=rsArtists("A_ArtistL")&rsArtists("A_ArtistF")
		End If
		strLinks=""
		If strAmazon>"" Then strLinks="<a target=_blank href=" & strAmazon & ">Amazon</a>"
		If strItunes>"" Then
			If strLinks>"" Then strLinks=strLinks&"<br />"
			strLinks=strLinks&"<a target=_blank href=" & strItunes & ">Itunes</a>"
		End If
		If strURL>"" Then
			If strLinks>"" Then strLinks=strLinks&"<br />"
			strLinks=strLinks&"<a target=_blank href=" & strURL & ">URL</a>"
		End If
		If strVimeo>"" Then
			If strLinks>"" Then strLinks=strLinks&"<br />"
			strLinks=strLinks&"<a target=_blank href=" & strVimeo & ">Vimeo</a>"
		End If
		If strWebsite>"" Then
			If strLinks>"" Then strLinks=strLinks&"<br />"
			strLinks=strLinks&"<a target=_blank href=" & strWebsite & ">Website</a>"
		End If
		If strYouTube>"" Then
			If strLinks>"" Then strLinks=strLinks&"<br />"
			strLinks=strLinks&"<a target=_blank href=" & strYouTube & ">YouTube</a>"
		End If
		Response.Write	"				<tr bgColor=""" & CColor & """ valign=""middle"">" & vbNewLine & _
			"					<td align=""center"" width=""15%"">" & vbNewLine & _
			"						<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><img src=""" & rsArtists("A_Image") & """ height=""75px;"" width=""75px;"" onmouseover=""showtrail('" & rsArtists("A_Image") & "','" & rsArtists("A_Title") & "',500,700)"" onmouseout=""hidetrail()"" />"& vbNewLine & _
			"						</font>" & vbNewLine & _
			"					</td>" & vbNewLine & _
			"					<td align=""center"" width=""40%"">" & vbNewLine & _
			"						<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & rsArtists("A_Title") & vbNewLine & _
			"						</font>" & vbNewLine & _
			"					</td>" & vbNewLine & _
			"					<td align=""center"" width=""30%"">" & vbNewLine & _
			"						<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & strArtist & vbNewLine & _
			"						</font>" & vbNewLine & _
			"					</td>" & vbNewLine & _
			"					<td align=""center"" width=""10%"">" & vbNewLine & _
			"						<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & strLinks & vbNewLine & _
			"						</font>" & vbNewLine & _
			"					</td>" & vbNewLine & _
			"					<td align=""center"" width=""5%"">" & vbNewLine & _
			"						<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>"
		If mLev>3 Then
			Response.Write	"				<a href=""artists.asp?mode=edit&id=" & intID & """" & dWStatus("Edit Item") & "><acronym style=""border:none; text-decoration:none"" title=""Edit Item""><img src=""" & strImageURL & "icon_pencil.gif"" height=""16"" width=""16"" alt=""Edit Item"" style=""border:none; text-decoration:none;""></acronym></a>" & vbNewLine & _
				"				<a href=""artists.asp?mode=delete&id=" & intID & """" & dWStatus("Delete Item") & "><acronym style=""border:none; text-decoration:none"" title=""Delete Item""><img src=""" & strImageURL & "icon_trashcan.gif"" height=""16"" width=""16"" alt=""Delete Item"" style=""border:none; text-decoration:none;""></acronym></a>" & vbNewLine
		End If
		Response.Write	"						</font>" & vbNewLine & _
			"					</td>" & vbNewLine & _
			"				</tr>" & vbNewLine
		intI=1-intI
		Rec=Rec+1:If Rec>intPgSize Then Exit Do
		rsArtists.MoveNext
	Loop
	rsArtists.Close
End If
Set rsArtists=Nothing
Response.Write	"			</table></form></div>" & vbNewLine & _
		"		</td>" & vbNewLine & _
		"	</tr>" & vbNewLine
If maxpages>1 Then
	Response.Write	"	<tr><td colspan=""5"" width=""95%"" align=""left"" bgColor=""" & strPageBGColor & """>"
	Call DropDownPaging2(2)
	Response.Write	"	</td></tr>"
End If
Response.Write	"</table>" & vbNewLine
WriteFooter

Sub DropDownPaging2(fnum)
	If maxpages > 1 Then
		If mypage = "" Then
			pge = 1
		Else
			pge = mypage
		End If
		If Request.QueryString("type")>"" Then strAction=Request.QueryString("type")
		Response.Write	"                <form name=""PageNum" & fnum & """ action=""artists.asp"">" & vbNewLine
		If strAction>"" Then Response.Write	"								 <input type=""hidden"" name=""type"" value=""" & strAction & """>" & vbNewLine
		If Request("sort")>"" Then Response.Write	"								 <input type=""hidden"" name=""sort"" value=""" & Request("sort") & """>" & vbNewLine
		If Request("keyword")>"" Then Response.Write	"								 <input type=""hidden"" name=""keyword"" value=""" & Request("keyword") & """>" & vbNewLine
		If Request("category")>"" Then Response.Write	"								 <input type=""hidden"" name=""category"" value=""" & Request("category") & """>" & vbNewLine
		Response.Write	"								<b>Page: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine
		For counter = 1 to maxpages
			If counter <> cLng(pge) Then
				Response.Write "									<option value=""" & counter &	""">" & counter & "</option>" & vbNewLine
			Else
				Response.Write "									<option selected value=""" & counter &	""">" & counter & "</option>" & vbNewLine
			End If
		Next
		Response.Write	"								</select><b> of " & maxpages & "</b>" & vbNewLine & _
			"								</font>" & vbNewLine & _
			"						</form>" & vbNewLine
	End If
End Sub
%>


Searching supports the following boolean logic:

For OR, just include spaces between terms (e.g. crooked cop)
For AND, include AND (in caps) between terms (e.g., cop AND crooked)
For exact phrase, surround in quotation marks (e.g., "crooked cop")
For exclusion, put NOT (in caps) before term (e.g., cop NOT crooked)
MaGraham Posted - 07 November 2013 : 04:53:43

Carefree, I'm not sure how you are going to do all of this but I'm thinking there should probably be a link for "Click here to purchase this MP3" too since some members like that option.


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