alan1950
Forum Replies Created
-
Forum: Plugins
In reply to: [Backup Migration] unable to restore a backupHi MixHa, thank you for your reply (and apologies for not replying to my previous support post – I missed the email notification completely)
I am having trouble finding the php.ini file and so have passed on a ticket to my host provider, so it may be a couple of days before I try your solution.
Best wishes
Alan
Forum: Fixing WordPress
In reply to: No long able to copy table from Excel to WPHere’s the VBA code for the macro “TableToHTML” plus installation instructions.
This will allow you to select an Excel table and paste it into WordPress as an HTML table.
HOW TO INSTALL
1) Place the below code into a VBA module and save the Workbook as “Table To HTML.xlsm”.
2) Next save the WB as an Excel Add-in.
3) Close the file and open a new workbook.
4) If you don’t have the [Developer] entry on the ribbon select [File] > [Options] > [Customize Ribbon]. Then under “Main Tabs” scroll down and tick “Developer” then click [OK].
5) From the ribbon select [Developer] > [Excel Add-ins] then tick “Table-To-HTML”
6) Select [File] > [Options] > [Quick Access Toolbar]. Under “Choose commands From” select “Macros” then select “TableToHTML, click [Add >>] then [OK]
HOW TO USE
1) Select the table in your Excel Workbook. Only one rectangular table can be selected.
2) Click [TableToHTML] on your newly created Quick Access Toolbar. The selected area is now converted to HTML and placed on the clipboard.
3) Note the message at the bottom left of the screen which will be one of:
“hh:mm:ss: Cells XX9:YY9 copied to clipboard as an HTML table”
optionally followed by “xx rows copied, yy rows omitted”
and/or “zz columns omitted”
4) In WordPress create a Custom HTML block and paste the contents of the clipboard. The table will contain a horizontal scrollbar if too large for the page.VBA CODE
Sub Table_To_HTML() Dim bEmptySelection As Boolean Dim lRowPtr As Long Dim lColPtr As Long Dim lEndRow As Long Dim lEndCol As Long Dim lSkippedRows As Long Dim lIncludedRows As Long Dim lSkippedCols As Long Dim rData As Range Dim rCur As Range Dim sCurTag1 As String Dim sCurTag2 As String Dim sCurValue As String Dim sHTML As String Dim sMessage As String Dim sMessIR As String Dim sMessSR As String Dim sMessSC As String Dim vReply As Variant Dim WS As Worksheet Application.StatusBar = False sCurTag1 = "<th>" sCurTag2 = "</th>" sMessIR = "s" sMessSR = "s" sMessSC = "s" sHTML = "<div style='overflow-x:auto;'><table> " Set rData = Intersect(Application.Selection, ActiveSheet.UsedRange) If rData Is Nothing Then MsgBox prompt:="ERROR: No data selected!", Buttons:=vbOKOnly + vbCritical Exit Sub End If If rData.Areas.Count > 1 Then MsgBox prompt:="ERROR: Only one rectangular area can be selected", Buttons:=vbOKOnly + vbCritical Exit Sub End If bEmptySelection = True lSkippedRows = 0 lIncludedRows = 0 lSkippedCols = 0 For lRowPtr = 0 To rData.Rows.Count - 1 lEndCol = rData.Columns.Count - 1 For lColPtr = 0 To lEndCol Set rCur = rData.Resize(1, 1).Offset(lRowPtr, lColPtr) If rCur.RowHeight > 0 Then If lColPtr = 0 Then sHTML = sHTML & "<tr>" lIncludedRows = lIncludedRows + 1 End If If rCur.ColumnWidth > 0 Then sCurValue = CStr(rCur.Text) If (Trim$(sCurValue)) <> "" Then bEmptySelection = False End If sHTML = sHTML & sCurTag1 & HTMLSpecialChars(sCurValue) & sCurTag2 Else If lRowPtr = 0 Then lSkippedCols = lSkippedCols + 1 End If End If If lColPtr = lEndCol Then sHTML = sHTML & "</tr>" & vbCrLf End If Else If lColPtr = 0 Then lSkippedRows = lSkippedRows + 1 End If End If Next lColPtr sCurTag1 = "<td>" sCurTag2 = "</td>" Next lRowPtr sHTML = sHTML & "</table></div>" Clipboard sHTML If bEmptySelection Then MsgBox prompt:="ERROR: Your have not selected any data!", Buttons:=vbOKOnly + vbCritical Exit Sub End If sMessage = Format(Now(), "hh:mm:ss") & ": Cells " & rData.Address(False, False) & " copied to clipboard as an HTML table" If lSkippedRows > 0 Then If lSkippedRows = 1 Then sMessSR = "" If lIncludedRows = 1 Then sMessIR = "" sMessage = sMessage & " " & lIncludedRows & " row" & sMessIR & " copied, " & lSkippedRows & " row" & sMessSR & " omitted" End If If lSkippedCols > 0 Then If lSkippedCols = 1 Then sMessSC = "" sMessage = sMessage & ", " & lSkippedCols & " column" & sMessSC & " omitted" End If Application.StatusBar = sMessage If rData.Rows.Count < 2 Then MsgBox prompt:="WARNING: Only 1 row selected!", Buttons:=vbOKOnly + vbExclamation End If End Sub Private Function Clipboard$(Optional s$) 'https://stackoverflow.com/questions/14219455/excel-vba-code-to-copy-a-specific-string-to-clipboard Dim v: v = s 'Cast to variant for 64-bit VBA support With CreateObject("htmlfile") With .parentWindow.clipboardData Select Case True Case Len(s): .setData "text", v Case Else: Clipboard = .GetData("text") End Select End With End With End Function Private Function HTMLSpecialChars(ByVal InputString As String) As String Dim lPtr As Long Dim sResult As String Dim vaFromString As Variant Dim vaToString As Variant vaFromString = Array("&", Chr(34), "'", "<", ">") vaToString = Array("&", """, "'", "<", ">") sResult = InputString For lPtr = LBound(vaFromString) To UBound(vaFromString) sResult = Replace(sResult, vaFromString(lPtr), vaToString(lPtr)) Next lPtr HTMLSpecialChars = sResult End FunctionForum: Fixing WordPress
In reply to: No long able to copy table from Excel to WPI can supply the VBA code plus a guide if people are interested
Forum: Fixing WordPress
In reply to: No long able to copy table from Excel to WPHi all, My solution was to create a VBA add-in that, when called, generates an HTML table from the selected cells and places it into the MS clipboard.
I also created an entry on Excel’s Quick Access toolbar, so whenever I want to generate a table from an Excel sheet I just:
1 Highlight the cells of the Excel table
2 Run the macro (just 1 click on the Quick Access toolbar)
3 In WordPress create a Custom HTML block and [Crrl-V] to paste the generated table.- This reply was modified 4 years ago by alan1950. Reason: clarification
Forum: Plugins
In reply to: [The Events Calendar] Events not showing in 5.5.0sorry folks, the widget had been removed from the side bar as described in the known issues section.
Forum: Plugins
In reply to: [The Events Calendar] Events not showing in 5.5.0Is anyone else having this issue?
Forum: Plugins
In reply to: [The Events Calendar] Event date not showing correct formatHi,
Issue not really solved, I really liked the day number appearing largeer and bold. Cannot see any differences between test and live site, I assume that there is some plugin clash somewhere.
I’ve settled for putting this into additional CSS:
.widget-area h2 {
font-size: 24px;
}
.widget-area h3 {
font-size: 16px;
margin 0px 0px 0px 0px;
}
.widget-area a {
font-size: 16px;
font-weight: normal;
margin 0px 0px 0px 0px;
color: Blue;
}
.widget-area div {
font-size: 16px;
margin 0px 0px 0px 0px;
color: Black;
font-weight: bold;
}Forum: Plugins
In reply to: [The Events Calendar] Event date not showing correct formatHi Andras, thank you for your reply.
The issue I’m having is with the front page of the test subdomain (in the right sidebar). The URL is test dot spectrumstriders dot org dot ukThe front page of the live ‘www’ site is displaying the events beautifully.
The settings are the same for both the test subdomain and for the live site.
I can confirm that the ” Default Events Template ” was already selected however I confirmed by saving the settings again.
The settings for the sidebar (on both sites) are:
container width = 1160px
content width = 70%
sidebar width = 25%I have moved back to the Zakra theme now (which allows me to adjust the sidebar width) but when I activated Twenty Twenty-one theme, the sidebar was moved to the footer but the events calendar still displayed the same (incorrect) formatting.
Many thanks
Alan
Forum: Themes and Templates
In reply to: [Zakra] Zakra Theme 1.5.6 to 1.5.7 upgradeHi Barsha,
In order to further invest I changed the theme to “Twenty Twenty-one” (ugh!) which is still displaying the issue.
I will close this as resolved.Many thanks
Alan
Forum: Themes and Templates
In reply to: [Zakra] Zakra Theme 1.5.6 to 1.5.7 upgradeHi Barsha, thank you for your reply.
The issue I’m having is on a test subdomain so I have disabled ALL plugins except for Events Calendar.
On the live site (www dot spectrumstriders dot org dot uk) , the date formatting appears correctly.
However on this test subdomain (test dot spectrumstriders dot org dot uk) the date formatting does not, the only difference being that I’ve upgraded the test to 1.5.7 whereas the live site is on 1.5.6.Both sites are on WP 5.7.
Can you advise please?
Many thanks
Alan
Further information, I installed My Calendar 3.2.15 on a new test sub-domain, and the location dropdown works fine.
However deleting and re-installing on the live site does NOT fix the problem.Further info: I just re tried this using the latest release of My Calendar (3.2.15). It seems that you will get a dropdown list only when you have typed in the first complete word of the location (so if the location is “White House” the drop down list appears after you type “White”.
Forum: Themes and Templates
In reply to: [Zakra] Unable to show post full textThat has worked fine, Thank you Barsha 🙂
Sorry folks forgot to mark as resolved :/
Hi Ashesh, I think I misled you, your original answer is correct.
I suspect the culprit is the ‘accordion’ plugin, until it’s resolved I have temporarily
inserted the above css which is a workround. I did try editing the h1 to h6 headings via the Zakra theme in case that may have reset it, but did not fix it i’m afraid.
Many thanks for your help.
Alan