Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
3ba9cb5d
Commit
3ba9cb5d
authored
Feb 10, 2001
by
Dries
Browse files
- small updates
parent
282fbfd2
Changes
5
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
3ba9cb5d
...
...
@@ -16,8 +16,9 @@ drupal 1.xx, xx/xx/2001
* you can setup multiple drupal sites on top of the same physical source
tree either by using vhosts or sub-directories
- added "user ratings" similar to SlashCode's karma or Scoop's mojo.
- added search infractructure:
* better search page + search functionality in administration pages.
- added "search infractructure":
* improved search page and integrated search functionality in the
administration pages.
- various updates:
* improved cron-module
* improved module-module
...
...
account.php
View file @
3ba9cb5d
...
...
@@ -481,7 +481,7 @@ function account_track_site() {
$output
.
=
"</UL>
\n
"
;
}
$theme
->
header
();
$theme
->
header
();
$theme
->
box
(
"Track
$site_name
"
,
$output
);
$theme
->
footer
();
}
...
...
modules/account.module
View file @
3ba9cb5d
...
...
@@ -141,6 +141,14 @@ function account_display($order = "username") {
print
$output
;
}
function
account_blocks
(
$id
)
{
$result
=
db_query
(
"SELECT * FROM layout WHERE user =
$id
"
);
while
(
$layout
=
db_fetch_object
(
$result
))
{
$output
.
=
"<LI>"
.
check_output
(
$layout
->
block
)
.
"</LI>
\n
"
;
}
return
$output
;
}
function
account_stories
(
$id
)
{
$result
=
db_query
(
"SELECT * FROM stories WHERE author =
$id
ORDER BY timestamp DESC"
);
while
(
$story
=
db_fetch_object
(
$result
))
{
...
...
@@ -199,6 +207,7 @@ function account_edit($name) {
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
><B>Signature:</B></TD><TD><TEXTAREA NAME=
\"
edit[signature]
\"
COLS=
\"
35
\"
ROWS=
\"
5
\"
WRAP=
\"
virtual
\"
>
$account->signature
</TEXTAREA></TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
><B>Theme:</B></TD><TD>"
.
format_data
(
$account
->
theme
)
.
"</TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
><B>Timezone:</B></TD><TD>"
.
format_data
(
$account
->
timezone
/
3600
)
.
"</TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
VALIGN=
\"
top
\"
><B>Selected blocks:</B></TD><TD>"
.
format_data
(
account_blocks
(
$account
->
id
))
.
"</TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
VALIGN=
\"
top
\"
><B>Submitted stories:</B></TD><TD>"
.
format_data
(
account_stories
(
$account
->
id
))
.
"</TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
VALIGN=
\"
top
\"
><B>Submitted comments:</B></TD><TD>"
.
format_data
(
account_comments
(
$account
->
id
))
.
"</TD></TR>
\n
"
;
$output
.
=
"</TABLE>
\n
"
;
...
...
@@ -231,6 +240,7 @@ function account_view($name) {
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
><B>Signature:</B></TD><TD>"
.
format_data
(
$account
->
signature
)
.
"</TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
><B>Theme:</B></TD><TD>"
.
format_data
(
$account
->
theme
)
.
"</TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
><B>Timezone:</B></TD><TD>"
.
format_data
(
$account
->
timezone
/
3600
)
.
"</TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
VALIGN=
\"
top
\"
><B>Selected blocks:</B></TD><TD>"
.
format_data
(
account_blocks
(
$account
->
id
))
.
"</TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
VALIGN=
\"
top
\"
><B>Submitted stories:</B></TD><TD>"
.
format_data
(
account_stories
(
$account
->
id
))
.
"</TD></TR>
\n
"
;
$output
.
=
" <TR><TD ALIGN=
\"
right
\"
VALIGN=
\"
top
\"
><B>Submitted comments:</B></TD><TD>"
.
format_data
(
account_comments
(
$account
->
id
))
.
"</TD></TR>
\n
"
;
$output
.
=
"</TABLE>
\n
"
;
...
...
modules/affiliate-site.module
View file @
3ba9cb5d
...
...
@@ -55,8 +55,8 @@ function affiliate_block() {
return
$blocks
;
}
function
affiliate_admin_add
(
$name
,
$
link
,
$contact
)
{
db_query
(
"INSERT INTO affiliates (name, link, contact) VALUES ('"
.
check_input
(
$name
)
.
"', '"
.
check_input
(
$
link
)
.
"', '"
.
check_input
(
$contact
)
.
"')"
);
function
affiliate_admin_add
(
$name
,
$
url
,
$contact
)
{
db_query
(
"INSERT INTO affiliates (name, link, contact) VALUES ('"
.
check_input
(
$name
)
.
"', '"
.
check_input
(
$
url
)
.
"', '"
.
check_input
(
$contact
)
.
"')"
);
}
function
affiliate_admin_del
(
$id
)
{
...
...
@@ -74,7 +74,7 @@ function affiliate_admin_display() {
$output
.
=
" <TR><TD>
$affiliate->name
</TD><TD>"
.
format_url
(
$affiliate
->
link
)
.
"</TD><TD>"
.
format_email
(
$affiliate
->
contact
)
.
"</TD><TD ALIGN=
\"
center
\"
><A HREF=
\"
admin.php?mod=affiliate-site&op=delete&id=
$affiliate->id
\"
>delete</A></TD></TR>
\n
"
;
}
$output
.
=
" <TR><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
name
\"
></TD><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
link
\"
></TD><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
contact
\"
></TD><TD><INPUT NAME=
\"
op
\"
TYPE=
\"
submit
\"
VALUE=
\"
Add affiliate
\"
></TD></TR>
\n
"
;
$output
.
=
" <TR><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
name
\"
></TD><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
url
\"
></TD><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
contact
\"
></TD><TD><INPUT NAME=
\"
op
\"
TYPE=
\"
submit
\"
VALUE=
\"
Add affiliate
site
\"
></TD></TR>
\n
"
;
$output
.
=
"</TABLE>
\n
"
;
$output
.
=
"</FORM>
\n
"
;
...
...
@@ -82,13 +82,13 @@ function affiliate_admin_display() {
}
function
affiliate_admin
()
{
global
$op
,
$id
,
$name
,
$
link
,
$contact
;
global
$op
,
$id
,
$name
,
$
url
,
$contact
;
print
"<SMALL><A HREF=
\"
admin.php?mod=affiliate-site
\"
>overview</A> | <A HREF=
\"
admin.php?mod=affiliate-site&op=help
\"
>help</A></SMALL><HR>
\n
"
;
switch
(
$op
)
{
case
"Add affiliate"
:
affiliate_admin_add
(
$name
,
$
link
,
$contact
);
case
"Add affiliate
site
"
:
affiliate_admin_add
(
$name
,
$
url
,
$contact
);
affiliate_admin_display
();
break
;
case
"delete"
:
...
...
modules/drupal-site.module
View file @
3ba9cb5d
...
...
@@ -48,8 +48,8 @@ function drupal_block() {
return
$blocks
;
}
function
drupal_admin_add
(
$name
,
$
link
,
$contact
)
{
db_query
(
"INSERT INTO drupals (name, link, contact) VALUES ('"
.
check_input
(
$name
)
.
"', '"
.
check_input
(
$
link
)
.
"', '"
.
check_input
(
$contact
)
.
"')"
);
function
drupal_admin_add
(
$name
,
$
url
,
$contact
)
{
db_query
(
"INSERT INTO drupals (name, link, contact) VALUES ('"
.
check_input
(
$name
)
.
"', '"
.
check_input
(
$
url
)
.
"', '"
.
check_input
(
$contact
)
.
"')"
);
}
function
drupal_admin_del
(
$id
)
{
...
...
@@ -67,7 +67,7 @@ function drupal_admin_display() {
$output
.
=
" <TR><TD>
$drupal->name
</TD><TD>"
.
format_url
(
$drupal
->
link
)
.
"</TD><TD>"
.
format_email
(
$drupal
->
contact
)
.
"</TD><TD ALIGN=
\"
center
\"
><A HREF=
\"
admin.php?mod=drupal-site&op=delete&id=
$drupal->id
\"
>delete</A></TD></TR>
\n
"
;
}
$output
.
=
" <TR><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
name
\"
></TD><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
link
\"
></TD><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
contact
\"
></TD><TD><INPUT NAME=
\"
op
\"
TYPE=
\"
submit
\"
VALUE=
\"
Add drupal site
\"
></TD></TR>
\n
"
;
$output
.
=
" <TR><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
name
\"
></TD><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
url
\"
></TD><TD><INPUT TYPE=
\"
text
\"
NAME=
\"
contact
\"
></TD><TD><INPUT NAME=
\"
op
\"
TYPE=
\"
submit
\"
VALUE=
\"
Add drupal site
\"
></TD></TR>
\n
"
;
$output
.
=
"</TABLE>
\n
"
;
$output
.
=
"</FORM>
\n
"
;
...
...
@@ -75,11 +75,11 @@ function drupal_admin_display() {
}
function
drupal_admin
()
{
global
$op
,
$id
,
$name
,
$
link
,
$contact
;
global
$op
,
$id
,
$name
,
$
url
,
$contact
;
switch
(
$op
)
{
case
"Add drupal site"
:
drupal_admin_add
(
$name
,
$
link
,
$contact
);
drupal_admin_add
(
$name
,
$
url
,
$contact
);
drupal_admin_display
();
break
;
case
"delete"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment