Have you ever had a project that seemed to have a life of it’s own? I have and my latest was SpyText. It not only gave itself it’s name but also demanded features that I never intended to include. Let me explain. I originally named the Plugin HideText on the Plugins Proposal Page but felt a better name for it would have been HideStuff - mainly because that's what it does. When I started working on it though - I asked myself - "What kind of people hide things in plain sight?" - and quickly answered "A Spy Does!" I didn't seem to have be a choice after that. My imagination (and warped sense of humor) took me and I found myself in the Madd Magazine's Land named Spy-Verses-Spy where I left Secret Messages everywhere. Alive or not - the decision was made. The name became SpyText and there was no turning back. While the idea behind SpyText was simple - I found that writing the code was far more difficult than I had imagined. I like Puns (especially Groaners) and when I started writing - they kept jumping on my desk and demanding to be included. Each time the code became a little more complex - but that wasn't the real killer. The real difficultly was that I couldn't reach the keyboard while sitting on the floor. Each Pun arrived in rapid succession and they had me laughing so hard I that I kept falling out of my chair. I've been told that simple minds are easily amused and I guess it's true. At any rate - there is a Spy hidden on nearly every line of SpyText's code.
Summary - So What Does It Do?
All that SpyText does is Hide Stuff! The Default Visibility for every Message is - Don't Show Nobody Nuttin and everything placed between it's 2 Code Blocks is hidden from everyone Except the Spy(s) & Agency(ies) (Users & Groups) that you define. Note: It's a Plot! A Conspiracy I say! Every Administrator is a Spy! They see every SpyText Message! All of this means that SpyText can be used as a way of controlling what each User will see on a page. As an example: Anonymous Users can be shown one thing while Registered Users can be shown something else entirely. Note To Administrators: If you are using SpyText Messages in this manner - Make sure you test the visibility of the Messages in the Groups your including (or excluding). I know that this seems obvious - but I made this mistake while writing this page. I do most of my editing on my Testing Site before placing the finished pages on bitweaver.org. Everything looked great to on my Site where I was the Administrator. After adding it to bitweaver.org though - I discovered that None of my Examples were visible. Oh - Dahhhhh!
The alert parameter is provided to give the Less-Than-Swift Spy a little assistance in finding their Messages. Alert Boxes can be very annoying when overused - so please limit their usage to once a page or once per Spy / Group.
Administrators are not quite that fortunate. Every time SpyText creates a Hidden Message - an Alert Box is added to give the Administrator notice that a page has Hidden SpyText Message on it. This may be a mistake and if so it will be changed in the future - but that is how it is right now. What that means is that the Administrator will have a lot of Alert Boxes to respond to when the page contains a lot of hidden messages. This page as an example has 7 Alert Boxes - far too many.
Now if you Really want to play games with your Administrator - just dump a few hundred Hidden SpyText Messages on every page. Yes - You can be the first one on your block to find out how long it takes to Never Be Able To Login Again.
Note: This problem has been eliminated with the last update. Only one Alert Box will be generated per page.
Examples:
All of the Examples on this page have agency='Registered' specified so that only Users who are Logged In will be able to see the Messages. Anonymous User will not be able to see any of the Examples on this page. See for yourself - Log out and look at this page. The only SpyText Message that is visible - is Example 2 for Anonymous Users.
__{SPYTEXT spy='Guest' }Why don't you Log In? You will be able to see the Examples on this page if you do. Oh - Please!{SPYTEXT}__
{SPYTEXT spy='Guest' } Why don't you Log In? You will be able to see the Examples on this page if you do. Oh - Please!{/SPYTEXT}The SpyText Message in this Example is only be visible to Anonymous Users. That Message (modified so that everyone can see it) was: {SPYTEXT agency='Anonymous' } Why don't you Log In? You will be able to see the Examples on this page if you do. Oh - Please!{/SPYTEXT}HINT: You might want to look at the way bitweaver handles Groups. In essence - everyone who visits a bitweaver site belongs to at least one or more Groups. The Anonymous Group is the first and lowest level. If you were to specify agency='Anonymous' as an example: Everyone will be able to see your SpyText Message because Everyone is in the Anonymous Group. The Registered Group is the next highest level so specifying agency='Registered' will exclude only the Users that have not logged in as yet.
A Note About The Following Examples
In the following Examples we are going to play a buildup game with the Parameters. Each Example will have the same Parameters as the preceding Example except as noted.
Note: Click Address to Expand the Address Box {SPYTEXT spy='Spider|Xing|Confusus' agency='Registered' to='TRUE' }SpyText Message Data{/SPYTEXT}Note: Only valid Users are displayed in the Address Box and the User Confusus Does Not Exist.
Example 6 - The Agency Line Only Displays Valid Groups
Note: Click Address to Expand the Address Box {SPYTEXT spy='Spider|Xing|Confusus' agency='Aardvarks|Registered' to='TRUE' }SpyText Message Data{/SPYTEXT}Note: Only valid Groups are displayed in the Address Box and the Group Aardvarks Does Not Exist.
Example 7 - The Sender Line Only Displays Valid Users
Note: Click Address to Expand the Address Box {SPYTEXT spy='Spider|Xing|Confusus' agency='Aardvarks|Registered' sender='StarRider|Wolffy|Aquarius' to='TRUE' }SpyText Message Data{/SPYTEXT}Note: Only valid Users are displayed in the Address Box and the User Aquarius Does Not Exist__.
Each of these Examples use the Parameters spy='Spider' agency='Registered' sender='StarRider' with only the to Parameter being changed. In addition to specifying if the Address Box will be displayed (to='TRUE') - the to Parameter can change the Default Headers used in the Address Box. The Default Headers are: "To the Spy:" / "To the Agency:" / "From Your Source:" This is accomplished by providing replacement strings separated with the | Character. Note 1: The Address Box is available at any time no matter what other parameters are supplied. Note 2: For further information on the to Parameter - see the Plugin's Help (above).
The to Parameter is to='*|*|The Sexiest Spy Ever:' The * Character is used when you don't want to change a one or more of the Default Headers. In this case - only the Last Header "From Your Source:" is changed.
Note: Click Address to Expand the Address Box {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='*|*|The Sexiest Spy Ever:' }SpyText Message Data{/SPYTEXT}
Hidden Examples
All of the Hidden Examples use the Parameters spy='Spider' agency='Registered' sender='StarRider' to='TRUE' SpyText Messages can be hidden on a page. That is - the SpyText Message Data is placed in a Contracted Expandable Box that uses either the Title or an Icon as the link to Expand/Contract it. Note: A Hidden Message cause an Alert Box to be generated for the Administrator even if the Alert Parameter has not set - so please see the Heading about Abusing SpyText.
Since this is our first Example - lets Add hidden='TRUE'
Text {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' }SpyText Message Data{SPYTEXT} Text
Hidden Messages can take 3 different forms. The first is a Text Link that can be embedded in a paragraph like this one. Here is the Link {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' }SpyText Message Data{/SPYTEXT} and some additional text to show what it looks like when expanded.
Text {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' titlebar='TRUE' }SpyText Message Data{SPYTEXT} Text
The second form that a Hidden Message can take is the Title Bar. As you can see - a Title Bar is something like a Horizontal Rule with the Link centered on it. {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' titlebar='TRUE' }SpyText Message Data{/SPYTEXT} When placed inside a paragraph like this was - it always breaks that paragraph.
Example 12 - Changing the Title Bars Title & Width
This Example Adds title='Aardvarks Need Love Too' and width='35'
{SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' titlebar='TRUE' title='Aardvarks Need Love Too' width='35' }SpyText Message Data{SPYTEXT}
A long Title can be too long to look good - even when it is wrapped. So the Parameter width is used to make it more appealing. Here is the Link {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' titlebar='TRUE' title='Aardvarks Need Love Too' width='35' }SpyText Message Data{/SPYTEXT} and some additional text to show what it looks like when expanded.
This Example returns to the parameters used in Example 10 and Adds icon='TRUE'
Text {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' icon='TRUE' }SpyText Message Data{SPYTEXT} Text
The third form that a Hidden Messages can take is by using Icons. The Icon can be embedded in a paragraph like this one is. {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' icon='TRUE' }SpyText Message Data{/SPYTEXT} With some additional text to show what it looks like when expanded.
Text {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' icon='TRUE' titlebar='TRUE' }SpyText Message Data{SPYTEXT} Text
Or they can be placed in a Title Bar like this.{SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' icon='TRUE' titlebar='TRUE' }SpyText Message Data{/SPYTEXT} With some additional text to show what it looks like when expanded.
This Example returns to the parameters used in Example 10 and Adds icon='#24'
Text {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' icon='#24' }SpyText Message Data{SPYTEXT} Text
Every Imaged stored by the Users (Not the Default Images used by bitweaver) in a Gallery or any Liberty Package has a Content Id Number. {SPYTEXT spy='Spider' agency='Registered' sender='StarRider' to='TRUE' hidden='TRUE' icon='#24' }SpyText Message Data{/SPYTEXT} With some additional text to show what it looks like when expanded. Note: The Plugin's Help contains a link so that you can easilly determin what the Content Id Number of an Image is.
The Parameters Common in this Example are: agency='Registered' and hidden='TRUE'. An Icon stored in an Image Gallery is defined by icon='#' and different Alert Messages. I used the 3 Hidden SPYTEXT Messages as a means of demonstrating that only a single Alert will be given Per User or Per Page - and it is The Last Alert that they see.
Text {SPYTEXT agency='Registered' hidden='TRUE' icon='#34' alert='*UserName* - See Example 17 Message 1' }Message 1{SPYTEXT} Text Text {SPYTEXT agency='Registered' hidden='TRUE' icon='#35' alert='*UserName* - See Example 17 Message 2' }Message 2{SPYTEXT} Text Text {SPYTEXT agency='Registered' hidden='TRUE' icon='#36' alert='*UserName* - See Example 17 Message 3' }Message 3{SPYTEXT} Text
Please Note: The use of *UserName* in these examples. When included in the Alert Parameter (as shown) it will be replaced by the User's UserName. {SPYTEXT agency='Registered' hidden='TRUE' icon='#34' alert='*UserName* - See Example 17 Message 1' }Message 1{/SPYTEXT} {SPYTEXT agency='Registered' hidden='TRUE' icon='#35' alert='*UserName* - See Example 17 Message 2' }Message 2{/SPYTEXT} {SPYTEXT agency='Registered' hidden='TRUE' icon='#36' alert='*UserName* - See Example 17 Message 3' }Message 3{/SPYTEXT}
Final Thoughts
How to end this? For me - SpyText was one of those projects that make it all worth while. It started as something simple that grew and then just continued growing. At times it was a royal pain in the - Ahh-Hummmm! Most of that was my fault - nobody forced (or even asked) me to try to make everything that popped into my head work. I laughed my - Ahh-Hummmm! - off about it and thoroughly enjoyed myself. I hope that each of you will find a similar project.
good work. There is a little bug in - i allways got this little message on the top! Warning: Cannot modify header information - headers already sent by (output started at /home/bitweaver/R1/liberty/plugins/data.spytext.php:320) in /home/bitweaver/R1/kernel/BitSystem.php on line 316
Comments
There seems to be a little problem with SpyText
good work.
There is a little bug in - i allways got this little message on the top!
Warning: Cannot modify header information - headers already sent by (output started at /home/bitweaver/R1/liberty/plugins/data.spytext.php:320) in /home/bitweaver/R1/kernel/BitSystem.php on line 316