Skip to content

Commit

Permalink
Removed ads from generated pages since they provided no revenue
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Aug 23, 2010
1 parent 6a403ea commit 3df315c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 68 deletions.
7 changes: 6 additions & 1 deletion dist/releaseNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
<h3><a href='http://schemaspy.sourceforge.net'>SchemaSpy</a> Release Notes</h3>
<ul>

<li class='release'>x.x.x - xx/xx/xxxx - Subversion revision xxx
<li class='release'>5.1.0 - 08/23/2010 - Subversion revision 595
<ul>
<li>Removed the ads from the generated pages due to generating
close to zero revenue. The pages should be less cluttered
and potentially load faster.
<li>Added support for Teradata and SQLite databases.
</li>
<li>Resolved <a href="https://sourceforge.net/tracker/?func=detail&aid=2693317&group_id=137197&atid=737989">
bug 2693317</a> - SQL Server 2005 query bug<br>
Corrected the query to resolve variant field errors. rev 593.<br>
Expand Down
28 changes: 0 additions & 28 deletions src/net/sourceforge/schemaspy/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ public class Config
private Boolean evaluteAll;
private Boolean highQuality;
private Boolean lowQuality;
private Boolean adsEnabled;
private String schemaSpec; // used in conjunction with evaluateAll
private boolean populating = false;
public static final String DOT_CHARSET = "UTF-8";
Expand Down Expand Up @@ -1118,31 +1117,6 @@ public boolean isLowQuality() {
return lowQuality;
}

/**
* <code>true</code> if we should display advertisements.
* Defaults to <code>true</code>.<p>
* <b>Please do not disable ads unless absolutely necessary</b>.
*
* @return
*/
public void setAdsEnabled(boolean enabled) {
adsEnabled = enabled;
}

/**
* Returns <code>true</code> if we should display advertisements.<p>
* <b>Please do not disable ads unless absolutely necessary</b>.
*
* @return
*/
public boolean isAdsEnabled() {
if (adsEnabled == null) {
adsEnabled = !options.remove("-noads");
}

return adsEnabled ;
}

/**
* Set the level of logging to perform.<p/>
* The levels in descending order are:
Expand Down Expand Up @@ -1607,8 +1581,6 @@ public List<String> asList() throws IOException {
params.add("-rails");
if (isSingleSignOn())
params.add("-sso");
if (!isAdsEnabled())
params.add("-noads");
if (isSchemaDisabled())
params.add("-noschema");

Expand Down
7 changes: 2 additions & 5 deletions src/net/sourceforge/schemaspy/view/HtmlAnomaliesPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,8 @@ private void writeHeader(Database database, boolean hasOrphans, LineWriter html)
html.writeln("<table width='100%'>");
if (sourceForgeLogoEnabled())
html.writeln(" <tr><td class='container' align='right' valign='top' colspan='2'><a href='http://sourceforge.net' target='_blank'><img src='http://sourceforge.net/sflogo.php?group_id=137197&amp;type=1' alt='SourceForge.net' border='0' height='31' width='88'></a></td></tr>");
html.writeln("<tr>");
html.writeln("<td class='container'><b>Things that might not be 'quite right' about your schema:</b></td>");
html.writeln("<td class='container' align='right'>");
writeFeedMe(html);
html.writeln("</td></tr></table>");
html.writeln(" <tr><td class='container'><b>Things that might not be 'quite right' about your schema:</b></td></tr>");
html.writeln("</table>");
html.writeln("<ul>");
}

Expand Down
6 changes: 1 addition & 5 deletions src/net/sourceforge/schemaspy/view/HtmlConstraintsPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,8 @@ private void writeForeignKeyConstraints(List<ForeignKeyConstraint> constraints,
html.write(String.valueOf(constraintsByName.size()));
html.writeln(" Foreign Key Constraints:</b>");
html.writeln("</td><td class='container' align='right'>");
html.writeln("<table>");
if (sourceForgeLogoEnabled())
html.writeln(" <tr><td class='container' align='right' valign='top'><a href='http://sourceforge.net' target='_blank'><img src='http://sourceforge.net/sflogo.php?group_id=137197&amp;type=1' alt='SourceForge.net' border='0' height='31' width='88'></a></td></tr>");
html.writeln("<tr><td class='container'>");
writeFeedMe(html);
html.writeln("</td></tr></table>");
html.writeln(" <a href='http://sourceforge.net' target='_blank'><img src='http://sourceforge.net/sflogo.php?group_id=137197&amp;type=1' alt='SourceForge.net' border='0' height='31' width='88'></a>");
html.writeln("</td></tr>");
html.writeln("</table><br>");
html.writeln("<table class='dataTable' border='1' rules='groups'>");
Expand Down
26 changes: 0 additions & 26 deletions src/net/sourceforge/schemaspy/view/HtmlFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,35 +202,9 @@ protected void writeLegend(boolean tableDetails, boolean diagramDetails, LineWri
out.writeln(" </table>");
out.writeln(" </td></tr>");
out.writeln(" </table>");
writeFeedMe(out);
out.writeln("&nbsp;");
}

protected void writeFeedMe(LineWriter html) throws IOException {
if (Config.getInstance().isAdsEnabled()) {
StyleSheet css = StyleSheet.getInstance();

html.writeln("<div style=\"margin-right: 2pt;\">");
html.writeln("<script type=\"text/javascript\"><!--");
html.writeln("google_ad_client = \"pub-9598353634003340\";");
html.writeln("google_ad_channel =\"SchemaSpy-generated\";");
html.writeln("google_ad_width = 234;");
html.writeln("google_ad_height = 60;");
html.writeln("google_ad_format = \"234x60_as\";");
html.writeln("google_ad_type = \"text\";");
html.writeln("google_color_border = \"" + css.getTableHeadBackground().substring(1) + "\";");
html.writeln("google_color_link = \"" + css.getLinkColor().substring(1) + "\";");
html.writeln("google_color_text = \"000000\";");

html.writeln("//-->");
html.writeln("</script>");
html.writeln("<script type=\"text/javascript\"");
html.writeln("src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">");
html.writeln("</script>");
html.writeln("</div>");
}
}

protected void writeExcludedColumns(Set<TableColumn> excludedColumns, Table table, LineWriter html) throws IOException {
Set<TableColumn> notInDiagram;

Expand Down
3 changes: 1 addition & 2 deletions src/net/sourceforge/schemaspy/view/HtmlMainIndexPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ private void writeHeader(Database db, int numberOfTables, int numberOfViews, boo
html.writeln(" <td class='container' align='right' valign='top' rowspan='3'>");
if (sourceForgeLogoEnabled())
html.writeln(" <a href='http://sourceforge.net' target='_blank'><img src='http://sourceforge.net/sflogo.php?group_id=137197&amp;type=1' alt='SourceForge.net' border='0' height='31' width='88'></a><br>");
html.write(" <br>");
writeFeedMe(html);
html.writeln(" <br>");
html.writeln(" </td>");
html.writeln(" </tr>");
html.writeln(" <tr>");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ private void writeHeader(String databaseName, DatabaseMetaData meta, int numberO
if (sourceForgeLogoEnabled())
html.writeln(" <a href='http://sourceforge.net' target='_blank'><img src='http://sourceforge.net/sflogo.php?group_id=137197&amp;type=1' alt='SourceForge.net' border='0' height='31' width='88'></a><br>");
html.write(" <br>");
writeFeedMe(html);
html.writeln(" </td>");
html.writeln(" </tr>");
html.writeln("</table>");
Expand Down

0 comments on commit 3df315c

Please sign in to comment.