WordPress 테마

 

1. 테마구성
1) 화면 = 테마 + 플러그인
- 같은 기능에 대해서 테마와 플러그인의 차이는 플러그인은 테마와 무관하게 서비스 할 수 있는 장점이 있다.
2) 화면 구성 = 헤더(header.php) + 본문(index.php) + 사이드바(sidebar.php) + 푸터(footer.php)
. 헤더 : 로고, 내비게이션
. 본문 : 포스트글, 목록, 슬라이드, 포트폴리오
. 사이드바 : 다양한 위젯
. 푸터 : 푸터위젯, 저작권(copyright)
3) 워드프레스 구성요소 = php & html, css, MySQL
4) 기본파일 구성
- header.php
- index.php
- sidebar.php
- footer.php
- style.css

 

2. 테마설치
1) 알림판에서 자동검색해서 설치. 검증된 무표 테마를 제공한다.
2) 직접 다운받은 파일을 알림판엣 업로드하여 설치한다. 일림판에서 제공하는 않는 테마인 경우.
- 테마압축파일: 업로드해서 설치할 수 있다.
- 테마패키지파일: 패키지에 테마압축파일, 설명서, 여러 자원이 포함되어 있다. 압축해제후 테마압축파일만 업로드해야 한다.
3) 직접 다운받은 파일을 FTP로 업로드하여 설치한다. ~/wp-content/themes/ 디렉토리에 설치한다.

 

3. 무표테마 제공 사이트
- 유료로 판매하는 테마사이트에서 제공하는 무료테마를 받아서 설치한다.
- http://themeforest.net/category/wordpress 테마-오픈마켓
- http://codecanyon.net/category/wordpress 플러그인-오픈마켓
- http://www.woothemes.com/
- http://www.wpzoom.com/ 매거진 테마를 전문으로 제작.
- http://www.elegantthemes.com/ 1년 회원제로 운영. 유료 테마 제작사중 저렴한 편.
- http://templatic.com/ 특이한 테마 제공. 도서소개, 구인구직, 지역정보...
- http://www.studiopress.com/ 비즈니스 테마에 강점.
- http://www.pagelines.com/ Drag&Drop방식의 레이아웃을 구성할 수 있는 테마 프레임워크 제공.

 

end.

728x90

'Tools > WordPress' 카테고리의 다른 글

WordPress 플러그인  (0) 2019.10.14

 

# remove comments with C#

  1. Remove comments
  2. Maintain line number
using System;
using System.Text;
using System.Windows.Forms;

namespace WFRemoveComment
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnRemoveComment_Click(object sender, EventArgs e)
        {
            string s = System.IO.File.ReadAllText(@"C:\workspace_cs\WindowsFormsApp1\WindowsFormsApp1\Form1.cs");
        
            this.rtxText1.Text = s;
            this.rtxText2.Text = removeComment(s);
        }

        public static string removeCommentStyleJava(string s)
        {
            char lineCommentChar1 = '/';
            char lineCommentChar2 = '/';

            return removeComment(s, lineCommentChar1, lineCommentChar2);
        }

        public static string removeCommentStyleSql(string s)
        {
            char lineCommentChar1 = '-';
            char lineCommentChar2 = '-';

            return removeComment(s, lineCommentChar1, lineCommentChar2);
        }

        public static string removeComment(string s, char lineCommentChar1 = '/', char lineCommentChar2 = '/')
        {
            StringBuilder endResult = new StringBuilder(1000);

            const int outsideComment = 0;
            const int insideLineComment = 1;
            const int insideblockComment = 2;
            
            int currentState = outsideComment;
            if(s == null)
            {
                return endResult.ToString();
            }
            
            char c = (char) 0;
            char c2 = (char)0;
            for(int i = 0, cnt = s.Length; i < cnt; i++)
            {
                c = s[i];
                switch (currentState)
                {
                    case outsideComment:
                        if (c == lineCommentChar1 && (i+1) < cnt)
                        {
                            c2 = s[++i]; // 다음건 read
                            if (c2 == lineCommentChar2)
                                currentState = insideLineComment;
                            else if (c2 == '*')
                                currentState = insideblockComment;
                            else
                                endResult.Append(c).Append(c2);
                        }
                        else
                            endResult.Append(c);
                        break;
                    case insideLineComment:
                        if (c == '\r')
                            endResult.Append(c);

                        if (c == '\n')
                        {
                            currentState = outsideComment;
                            endResult.Append(c);
                        }
                        break;
                    case insideblockComment:
                        if (c == '\r' || c == '\n')
                            endResult.Append(c);

                        if (c == '*' && (i+1) < cnt)
                        {
                            c2 = s[++i]; // 다음건 read
                            if (c2 == '/')
                            {
                                currentState = outsideComment;
                                break;
                            }
                        }
                        break;
                } // end of switch
            } // end of for

            return endResult.ToString();
        }
    }
}

 

 

end.

728x90

'Programming Language > C#' 카테고리의 다른 글

[펌] Correlation of two arrays in C#  (0) 2020.02.06
ChartFX Help  (0) 2020.01.19
excel upload faster  (0) 2019.10.14
c# 관련사이트  (0) 2019.10.14
Highlight Textbox  (0) 2019.10.14

참조사이트

Normal ConnectionString : (work for xls files)

Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=\"Excel 8.0;HDR=YES;\""

Office 2007 ConnectionString : (work for xlsx files)

Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 12.0;HDR=YES;\""

 

private void UseOlebForLoadExcel()
{
	string filePath = "C:\\99.download\\샘플.xlsx";

	int nOutputRow = 0;
	string sSheetName = null;
	string sConnection = null;
	DataTable dtTablesList = default(DataTable);
	OleDbCommand oleExcelCommand = default(OleDbCommand);
	OleDbDataReader oleExcelReader = default(OleDbDataReader);
	OleDbConnection oleExcelConnection = default(OleDbConnection);


	sConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="+ filePath + ";Extended Properties=\"Excel 12.0;HDR=No;IMEX=1\"";

	oleExcelConnection = new OleDbConnection(sConnection);
	oleExcelConnection.Open();

	dtTablesList = oleExcelConnection.GetSchema("Tables");

	if (dtTablesList.Rows.Count > 0)
	{
		SheetName = dtTablesList.Rows[0]["TABLE_NAME"].ToString();
	}

	dtTablesList.Clear();
	dtTablesList.Dispose();

	if (!string.IsNullOrEmpty(sSheetName))
	{
		oleExcelCommand = oleExcelConnection.CreateCommand();
		oleExcelCommand.CommandText = "Select * From [" + sSheetName + "]";
		oleExcelCommand.CommandType = CommandType.Text;
		oleExcelReader = oleExcelCommand.ExecuteReader();
		nOutputRow = 0;

		while (oleExcelReader.Read())
		{
			// reader.GetDouble(0);
			var index = grid.Rows.Add();
			grid.Rows[index].Cells["filePath"].Value = oleExcelReader.GetString(0);
			grid.Rows[index].Cells["fileName"].Value = oleExcelReader.GetString(0);
			grid.Rows[index].Cells["lineNo"].Value = oleExcelReader.GetString(0);
			grid.Rows[index].Cells["fileCnts"].Value = oleExcelReader.GetString(0);
		}
		oleExcelReader.Close();
	}
	oleExcelConnection.Close();
}
728x90

'Programming Language > C#' 카테고리의 다른 글

ChartFX Help  (0) 2020.01.19
remove comments with C#  (0) 2019.10.14
c# 관련사이트  (0) 2019.10.14
Highlight Textbox  (0) 2019.10.14
Visual Studio Installer 를 이용한 배포(Deployment)  (0) 2019.10.14

1.방법 Hyperlink 를 사용해서 열거나,

 

2.vba를 이용하거나.

2번째 벙법으로 하면,
1) 파일을 매크로가 가능한 xlsm파일 형식으로 다른이름으로 저장하고,
2) Alt+F11을 눌러서, 코딩이 가능한 VBA 모드로 변환한다.
3) 해당 시트를 클릭해서, 아래 코드를 붙여 넣기 하고, 저장한다(Ctrl+S).여기서, 파일경로는 1행, 라인은 13라인.
4) 마지막으로, openFileInNotePad.bat 파일을 만든다.

 

# 1. VBA 의 해당 시트 코딩

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Column = 13 Then  // 이벤트가 실행될 컬럼
        Dim filePath As String
        Dim lineNo As String
        Dim RetVal As Integer
            
        filePath = Cells(Target.Row, 1) // 1: 파일경로를 가져올 컬럼
        lineNo = Cells(Target.Row, 5)   // 5: 파일라인을 가져올 컬럼
        If Target.Row > 1 And filePath <> "" Then
            RetVal = MsgBox("Run Batch", vbYesNo)
            If RetVal = 6 Then
                RetVal = Shell("C:\openFileInNotepad.bat" & " " & filePath & " " & lineNo, 1)
            End If
        End If
    End If
End Sub

 

# 2. openFileInNotePad.bat 코딩

"C:\Program Files (x86)\Notepad++\notepad++.exe" "%1" -n%2

 

 

end.

728x90

+ Recent posts