EIGHTEEN cool mods for ISC

For Articles relating to more than one ISC version
Snooper
Posts: 264
Joined: Sat Jun 26, 2010 9:22 pm

Letting customers bookmark your site etc.

Post by Snooper »

We want to keep our customers one way or another. So why not ask them to simply ‘Bookmark’ our site?

Find a place where the following code can be seen and let it do the rest !!

Code: Select all

            <a href="javascript:window.external.AddFavorite(document.location,document.title)">
                       <font color="#ffffff" size="1">Bookmark site</font></a> 
Make your page their home page..

Code: Select all

<font face="Arial" size="3">
<a href="#" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.yourweburl');">
Make <yoursitename> Your Homepage
</a>
</font>
Tell a friend your sites web address.

Code: Select all

<script language="JavaScript">
<!-- Begin

var initialsubj="Check out this great new site"
var initialmsg="Hi\nYou must see this great new site : "+window.location
var good;
function checkEmailAddress(field) {

var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
if (goodEmail) {
good = true;
}
else {
alert('Please enter a valid address.');
field.focus();
field.select();
good = false;
   }
}
u = window.location;
function mailThisUrl() {
good = false
checkEmailAddress(document.eMailer.email);
if (good) {

//window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+document.title+" "+u;
window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+initialmsg
   }
}
//  End -->
</script>

<form name="eMailer">
Tell a friend:
<input type="text" name="email" size="26" value="     Enter Address Here" onFocus="this.value=''" onMouseOver="window.status='Enter email address here and tell a friend about this site...'; return true" onMouseOut="window.status='';return true">
<br />
<input type="button" value="Send this URL" onMouseOver="window.status='Click to send an email (with this page address) to a friend! Enter email address above...'; return true" onMouseOut="window.status='';return true" onClick="mailThisUrl();">
</form>
Last edited by Snooper on Thu Apr 21, 2011 1:43 am, edited 3 times in total.
ISC 5.5.4 Ultimate : Being used here -- http://www.kdklondon.com
CharlieFoxtrot
Confirmed
Confirmed
Posts: 413
Joined: Sun Aug 09, 2009 1:23 pm

Re: EIGHTEEN cool mods for ISC

Post by CharlieFoxtrot »

Just curious... why do you add each new snippet and mod in the same (retitled) thread?

It seems to me -- and perhaps I'm mistaken -- that it would be more helpful if these modifications, tweaks and code-snippets (no matter how small) were each introduced in their own thread. ~~ I'm not sure that I understand the benefit of having them all grouped together in a single thread.

By having separate threads for each mod, the apparent benefits are:

-- More likely to be found in a search (whether on Google or the PHPBB search)
-- The best ones aren't "lost" and forgotten in pages and pages of other mods and discussion
-- Individual threads for each mod lend themselves to better discussion, questions, help about a particular mod/snippet
-- Individual threads make it easier for people to submit improvements (or bug reports).
-- Newbies may be a bit overwhelmed at a GROWING collection of snippets all in one place, and may not be inclined to browse and peruse.

I think there's some great stuff in here that would be very useful (or educational) for other users... including myself.

However... as a personal observation (or personal preference) this thread had become so unwieldy and cluttered that I tend to avoid it now. I'm never sure if the latest addition to the thread is because there's a *new* bit of code... or if it's simply a follow-up comment/question regarding one of the snippets that I'm not particularly interested in.

Just to be clear, I mean no offense, and I make these comments so that your valuable contributions are a more accessible resource to everyone who seeks help in this forum.

~ Charlie
ISC 4.0.7

"... and let's be honest that whole "by design" thing is getting old too."
Snooper
Posts: 264
Joined: Sat Jun 26, 2010 9:22 pm

Re: EIGHTEEN cool mods for ISC

Post by Snooper »

Errm..

Yes this is true..

Here's me thinking being under one bonnet, it would perhapes be simpler to point people from another place to here in one URL ??!!!

Can they be split and using the original headers placed into the right forum sections :?:
ISC 5.5.4 Ultimate : Being used here -- http://www.kdklondon.com
CharlieFoxtrot
Confirmed
Confirmed
Posts: 413
Joined: Sun Aug 09, 2009 1:23 pm

Re: EIGHTEEN cool mods for ISC

Post by CharlieFoxtrot »

Snooper wrote:Errm..

Yes this is true..

Here's me thinking being under one bonnet, it would perhapes be simpler to point people from another place to here in one URL ??!!!

Can they be split and using the original headers placed into the right forum sections :?:
At this stage, I think that trying to divide this thread into manageable pieces is probably more work than would be worthwhile.

Instead, it would probably be easier to simply create new threads for additional mods/snippets from this point forward. ~~ Or, if you had some fix or update to one of the current eighteen, then create a new thread (description/title/info) for the new version.

I'm not trying to make more work for you (you've already put quite a bit into this), I'm just trying to make it more useful for everyone.

Best always,
Charlie
ISC 4.0.7

"... and let's be honest that whole "by design" thing is getting old too."
karl800
Posts: 35
Joined: Sat Oct 03, 2009 8:43 pm
Location: Staffordshire, UK

Re: EIGHTEEN cool mods for ISC

Post by karl800 »

Hi Snooper,
Great work on the mods and sahring, just wondering if you can help out on modding the Side Panel Cart.

Don't think it looks quite bland it just shows all text links, and no graphics. I was thinking it would look better for the end customer, that it shows more cleaner and graphical.

Also can it be made so that the Side Cart is always shown. as currenlty it doesnt show unless you add to cart.

Ws thinking similair to the below.
http://shop.1stmx.co.uk/ - Graphical i mean this one.

But regards to buttons rather than text these below.

http://www.overclockers.co.uk
http://www.memorybits.co.uk/

Overclockers seem a good clean cart, as it list all the contents at top, then total cost at bottom, also allows you to delete an item, rather than going back to the main checkout

Cheers
Karl
pbanks
Posts: 8
Joined: Sat Mar 05, 2011 10:35 pm
Location: Ireland

Re: EIGHTEEN cool mods for ISC

Post by pbanks »

I've tried to get the barcode mod to work ... without any success! It shows up correctly in the packing slip.html and seems to show the correct code: <img src="http://store.irishdogs.ie/barcode/barco ... e=1676-6th Nov 2011&width=160&height=80"> but it totally fails to create an image. It's as if it isn't creating the image?

I have tried changing all the various parameters but to no avail. Any ideas or helpful tips as I really would like to incorporate this in my store for packing and sending.

Thanks a million!!
Snooper
Posts: 264
Joined: Sat Jun 26, 2010 9:22 pm

Re: EIGHTEEN cool mods for ISC

Post by Snooper »

Hi.. Sorry for a delay in reply..

The actual code itself works, as you will I'm sure see.. However, ISC is scripted in such a 'tight' unforgiving way and with truly scrappy code.. As though each PHP file was a write, re-write and nobody doing this writing, talking to fellow writers..!!

But to answer your question, it seems the best, perhaps only way is to make the code fit between the blocks that are the make up any page, printed matter.. Yes, that places the code 'off page' but you can sure get around that by placing your logo one side as a space filler come justification..

A pathetic answer I know, but ISC is and does act different between versions, making mods problematic not always, perfect ideals !!
ISC 5.5.4 Ultimate : Being used here -- http://www.kdklondon.com
bart
Posts: 57
Joined: Wed Sep 08, 2010 5:40 pm
Location: UK

Re: EIGHTEEN cool mods for ISC

Post by bart »

I have managed to put barcodes on our invoices buy installing a barcode font on my PC and then changing the style sheet to use this font.
I have attached the font and some instructions on using it. (you need to put a * before and after the number to be scanned, so this needs to be put in the template file too)

Not sure if this is what your after but hopefully useful to someone...
Attachments
IDAutomation.com Free Code 39 Font.rar
(156.4 KiB) Downloaded 1686 times
jason3w
Posts: 7
Joined: Wed May 19, 2010 11:49 pm

Re: EIGHTEEN cool mods for ISC

Post by jason3w »

Hi guys,
Thanks for all the cool mods.
Just a question. Does anyone know how to add the order number to the end of the subject line in emails going out to customers.
Currently gmail is group the conversations of anyone that replies.

Figured it would be in this area (below, from lib/orders.php), but don't know the code to add for the the Order Number.
Any help much appreciated.
Cheers
Jason

Locate the code...

// Create a new email API object to send the email
$store_name = GetConfig('StoreName');

$obj_email = GetEmailClass();
$obj_email->From(GetConfig('OrderEmail'), $store_name);
$obj_email->Set("Subject", sprintf(GetLang('YourOrderFrom'), $store_name));
$obj_email->AddBody("html", $message);
$obj_email->AddRecipient($email, "", "h");
$email_result = $obj_email->Send();
appsfinder
Posts: 6
Joined: Mon Apr 16, 2012 12:18 pm
Location: Doncaster South Yorkshire UK

Re: [mod] How many online - NOW ??

Post by appsfinder »

Snooper wrote:Love them or hate them, we all never the less need them.. Customers !

Not everybody will use this mod, but I do find that by ‘suggesting’ a site is active with users does seem to attract attention (As verified by independant trackers) This is a live who‘s online counter (One of many around I'm sure).. Put simply, it shows anybody who care to notice that somebody is onsite and looking around. You can have two minds on this one.. The url is live as I have set this up. Yes, it is early days, but that count will grow as the div code is transported to other sites. The code is here anyway --

1) Place the div code as given below via css style ruling onto the front or inside of your web site and pool your site uses with others so collectively creating a higher onsite count than in reality …

Code: Select all

<DIV ID="online">
      <IFRAME frameborder="0" scrolling="no" width="100" height="15" SRC="http://www.ihost4u.co.uk/online/count.cgi"> </IFRAME> 
</DIV>
OR if you want to use for yourself and not pool user numbers....

Code: Select all

<DIV ID="online">
      <IFRAME frameborder="0" scrolling="no" width="100" height="15" SRC="http://www.yourweburl/yourfolder/count.cgi"> </IFRAME> 
</DIV>
2) Then use the cgi script below naming the file count.cgi and place this in a folder of its own (I used /online) and CHMOD to 755. Then make the folder itself CHMOD 777.

When run, the cgi code should generate a text file - ips.txt. This is the method used to seperate who from who online at any given time and is based on users (irrespective of where from), time arriving and IP address. It is a temp event however, since this information it is removed the moment a user leaves. I have kept this simple so it pulls little in the way of server resources when used.

Code: Select all

#!/usr/bin/perl

###########################################
#ONLY EDIT THIS PART OF THE SCRIPT!!!!
  
$bgcolor = "#FFFFFF";	  #bacground color of frame
$size = "1";		  #font size of online user text
$face = "Verdana";	  #font face of online user text
$color = "#000080";	  #font color of online user text 
$tol=60;		  #refresh time(second). change if you want

# DO NOT EDIT BELOW THIS LINE!!!!
##########################################

print "Content-type: text/html\n\n";
$url = $ENV{'SCRIPT_NAME'};			# script's url
$ip = $ENV{'REMOTE_ADDR'};			# visitors ip number
$now=time;
$data = "ips.txt";

open (FILE,$data);
#flock(FILE,2);						#if you have got dense visitors you lock file
@text = <FILE>;
#flock(FILE,8);						# unlock
close (FILE);
foreach $line (@text){
	chop($line);					# erase \n (new line) end of line
	($ftime,$fip)=split(/=/,$line);	#seperate of =
	if ($ip ne $fip){				# if visitor's ip is not equal in file ip 
						# if recorded ip in the file unimportant
						# because will be new record 
		$diff = time-$ftime;		# now time is different file time
		if (($diff<$tol)&&($diff>0)){	# if difference small refresh and big of 0
			push @newtext, $line;	# take this line and erase other line
		}
	}
}

$newline="$now=$ip";				# online time and IP 
push @newtext,$newline;
$azs=scalar(@newtext);				#online user number
open (FILE,">$data");
#flock(FILE,2);
foreach $line (@newtext){print FILE "$line\n";}
#flock(FILE,8);
close (FILE);

$text ="visitor"; 
$text .="s" if ($azs>1);

# ---- Creating HTML page ----------
print <HtmlEND;
<html><head>
<meta http-equiv="REFRESH" content="$tol; URL=$url"></head>
<body bgcolor="$bgcolor" topmargin="2" leftmargin="2">
<center><font size="$size" face="$face" color="$color"><b>$azs</b> $text online
</font></center></body></html>
HtmlEND
;
Now if for example, I have two customers and, depending on the script you used, so do you.. If five site users have two customers we all see 10 customers online !! Good karma ?? Plain lies ?? *shruggs* Two edges of the same sword perhaps....

Image
can't seem to get this too work on my mac server please can you give more info for mac server ....thanks
Post Reply